[Request for 0.5 or whatever version :)] Shaders in CSM?

Sires
Member
 
Posts: 187
Joined: Mon Jan 02, 2017 21:00
Location: :noitacoL
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me

[Request for 0.5 or whatever version :)] Shaders in CSM?

by Sires » Fri Mar 23, 2018 19:58

Recently a friend from a server said that a good thing to minetest 0.5 would be to add glsl shaders by CSM, says him(I say that because I got near no idea how that stuff works, I just played a bit tweaking some values in the builtin shaders) that this would be easy since the shaders are only strings.
The functions suggested would be:
minetest.add_shader(here goes the glsl code)
minetest.add_value_to_shader(name, a var with the value)
and any other function related to making it work

I tried learning a lil bit about shaders and I see that combined with the fact that servers will be able to send CSMs to the client this could make some really interesting mods and using code kludges we could get even further, by example: maybe we want to make an "energy" flow passing from a block to another, I guess that the shader could detect this energy node and change its model to look like an energy flow. Thx by reading

/me starts imaginanting an acid trip shader in minetest, woah what a weird thing
I don't have anything important to say.
 

User avatar
rubenwardy
Moderator
 
Posts: 5859
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by rubenwardy » Fri Mar 23, 2018 20:02

Shaders will never be added to CSM, however server-sent shaders or client-provided shaders may be added
 

Sires
Member
 
Posts: 187
Joined: Mon Jan 02, 2017 21:00
Location: :noitacoL
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by Sires » Fri Mar 23, 2018 20:50

rubenwardy wrote:Shaders will never be added to CSM, however server-sent shaders or client-provided shaders may be added

Would it be possible to use the value from the minetest world in the shaders? such as metadata(when allowed) or nodedef or other things?

Also, is there any issue open about that? Or even pull request
I don't have anything important to say.
 

sofar
Developer
 
Posts: 2075
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by sofar » Fri Mar 23, 2018 21:02

There was some work by RBA to add node shaders (essentially sending shaders through lua to clients). This PR I believe is still around, so you could work off of that.
 

Sires
Member
 
Posts: 187
Joined: Mon Jan 02, 2017 21:00
Location: :noitacoL
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by Sires » Fri Mar 23, 2018 21:13

Right now I'm scrolling in the 16 pages related to shaders.... maybe I could add a tag to filter by author lol
Edit: Can't find rba...
Edit2: Nvm I didn't realize who RBA was
I don't have anything important to say.
 

Sires
Member
 
Posts: 187
Joined: Mon Jan 02, 2017 21:00
Location: :noitacoL
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by Sires » Fri Mar 23, 2018 21:32

I think is found it: https://github.com/minetest/minetest/pull/3391
Is it this one? Also my c++ skills are terrible and I have no idea how minetest structure works
Also it's ~3 years old, later I'll see what I can do.
I don't have anything important to say.
 

User avatar
Wuzzy
Member
 
Posts: 3625
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by Wuzzy » Sun Apr 08, 2018 19:39

There was some work by RBA to add node shaders (essentially sending shaders through lua to clients). This PR I believe is still around, so you could work off of that.

If this trend continues, soon Minetest will be nothing but Lua. ;-)
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

Sires
Member
 
Posts: 187
Joined: Mon Jan 02, 2017 21:00
Location: :noitacoL
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me

Re: [Request for 0.5 or whatever version :)] Shaders in CSM?

by Sires » Sun Apr 08, 2018 22:01

Wuzzy wrote:
There was some work by RBA to add node shaders (essentially sending shaders through lua to clients). This PR I believe is still around, so you could work off of that.

If this trend continues, soon Minetest will be nothing but Lua. ;-)

What can I do? I'm not interested in c++ right now
It would take way too much time learning c++ and minetest's structure
My only hope is guess someone do it instead of me
I don't have anything important to say.
 


Return to Feature Discussion



Who is online

Users browsing this forum: Google [Bot] and 2 guests