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

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

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

by Sires » Post

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: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

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

by rubenwardy » Post

Shaders will never be added to CSM, however server-sent shaders or client-provided shaders may be added
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

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

by Sires » Post

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: 2146
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 » Post

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: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

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

by Sires » Post

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: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

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

by Sires » Post

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: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

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

by Wuzzy » Post

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. ;-)

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

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

by Sires » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests