Page 1 of 6

GLSL Shaders

Posted: Wed Oct 30, 2013 11:36
by RealBadAngel
Here goes my repo with rework of shaders architecture and some new effects:

-improved Bumpmapping
-Parallax mapping
-Steep Parallax mapping
-water surface shaders (no reflections and refraction yet)

https://github.com/RealBadAngel/minetest/

Latest windows build with it:
http://realbadangel.pl/minetest/shaders ... haders.zip

Testers. opinions, help.... are welcome :)

Settings are now aviable in main menu.

Parallax mapping requires normal map file with height in alpha channel.
To prepare such file you can use GIMP (linux/windows) and normalmap plugin or CrazyBump http://www.crazybump.com (windows).
Haven texture pack have most of default textures done with normalmaps.

Little teaser:
Image
Image
Image

Posted: Wed Oct 30, 2013 12:08
by jojoa1997
I know this is stupid but how would I add a shader to the game? Also good job. Finally minetest has nice shaders.

Posted: Wed Oct 30, 2013 12:15
by Dan Duncombe
I assume we will still be able to disable shaders? My computer can't cope with them.

Posted: Wed Oct 30, 2013 16:46
by PilzAdam
The water looks good (the rest isnt that impressive).
Also, why do you create a second topic for it?

Posted: Wed Oct 30, 2013 17:00
by Inocudom
I would like to test these shaders, but I must know where to install them.

It looks like a build would have to be made of this. Fess might be interested.

Posted: Wed Oct 30, 2013 17:01
by rubenwardy
Nice.

If a client api is added, a function like this could be added:

Code: Select all

engine.register_shader( "mat_node_1", {
    {"shader.hlsl","edriver_shader_vert","main_vert"}
})

Posted: Wed Oct 30, 2013 17:24
by Inocudom
It looks like you might want to post your minetest_game fork too, RealBadAngel.

It looks like you are using your Haven texture pack there.

Posted: Wed Oct 30, 2013 18:23
by PilzAdam
Oh god this is annyoing. Cant you just fork the repo and create a branch like everyone else?

Btw, with what settings to you enable the new shaders?

Posted: Wed Oct 30, 2013 19:38
by Inocudom
PilzAdam wrote:Oh god this is annyoing. Cant you just fork the repo and create a branch like everyone else?

Btw, with what settings to you enable the new shaders?
Sfan5 made a build of this fork and I am testing it. What settings do I need to turn on in order to enable the new shaders?

Posted: Wed Oct 30, 2013 22:23
by RealBadAngel
PilzAdam wrote:Oh god this is annyoing. Cant you just fork the repo and create a branch like everyone else?

Btw, with what settings to you enable the new shaders?
Im not using branches because i cant fully control files on my hdd with them.
I dont like the idea of something apearin and disapering like rabbit pulled out of the hat.
So, no branches, sorry Winnetou.

About settings i will edit now 1st post and add some explanations.

Posted: Wed Oct 30, 2013 23:45
by Jordach
RealBadAngel wrote:
PilzAdam wrote:Oh god this is annyoing. Cant you just fork the repo and create a branch like everyone else?

Btw, with what settings to you enable the new shaders?
Im not using branches because i cant fully control files on my hdd with them.
I dont like the idea of something apearin and disapering like rabbit pulled out of the hat.
So, no branches, sorry Winnetou.

About settings i will edit now 1st post and add some explanations.
If you looked closely, there's a magical .git folder with all your branches and files inside, nothing is lost!

Posted: Thu Oct 31, 2013 14:38
by Inocudom
Someone that is skilled in understanding Minetest's code might be able to look in the repository of this fork and find out what commands must be entered into the minetest.config file in order for parallax mapping to work.

With bump mapping turned on, the blocks still do appear to be black in the inventory.

Posted: Thu Oct 31, 2013 16:13
by PilzAdam
Inocudom wrote:Someone that is skilled in understanding Minetest's code might be able to look in the repository of this fork and find out what commands must be entered into the minetest.config file in order for parallax mapping to work.

With bump mapping turned on, the blocks still do appear to be black in the inventory.
It would be simple to find that in the diff, but since RBA hasnt pushed it to a fork of the original Minetest repo its hard to get the diff.

Posted: Thu Oct 31, 2013 17:44
by sfan5
PilzAdam wrote:
Inocudom wrote:Someone that is skilled in understanding Minetest's code might be able to look in the repository of this fork and find out what commands must be entered into the minetest.config file in order for parallax mapping to work.

With bump mapping turned on, the blocks still do appear to be black in the inventory.
It would be simple to find that in the diff, but since RBA hasnt pushed it to a fork of the original Minetest repo its hard to get the diff.
ehm...

Code: Select all

$ cd minetest
$ git remote add rba https://github.com/RealBadAngel/minetest_GLSLshaders.git
$ git fetch rba
$ git diff origin/master rba/master
Anyway, I can't find any shaders in the diff produced by that only, moon/sun stuff

Posted: Thu Oct 31, 2013 19:21
by PilzAdam
sfan5 wrote:
PilzAdam wrote:
Inocudom wrote:Someone that is skilled in understanding Minetest's code might be able to look in the repository of this fork and find out what commands must be entered into the minetest.config file in order for parallax mapping to work.

With bump mapping turned on, the blocks still do appear to be black in the inventory.
It would be simple to find that in the diff, but since RBA hasnt pushed it to a fork of the original Minetest repo its hard to get the diff.
ehm...

Code: Select all

$ cd minetest
$ git remote add rba https://github.com/RealBadAngel/minetest_GLSLshaders.git
$ git fetch rba
$ git diff origin/master rba/master
Anyway, I can't find any shaders in the diff produced by that only, moon/sun stuff
Sure, and when I switch the branch I have to recompile Minetest completly because they dont have the same history (so git overrides each file and they get a new timestamp).

Posted: Thu Oct 31, 2013 19:50
by Inocudom
So this could mean that the shaders are not in sfan5's build of this branch?

Posted: Thu Oct 31, 2013 21:48
by sfan5
Inocudom wrote:So this could mean that the shaders are not in sfan5's build of this branch?
The shaders do not appear to be in the source code of what RBA posted.

Posted: Thu Oct 31, 2013 22:59
by RealBadAngel
Sorry, my fault. Ive cloned wrong repo...
Im pushing now correct sources.

Posted: Thu Oct 31, 2013 23:18
by Inocudom
According to the commit history of the repo, some changes were made recently. You might want to make a new build of the fork, sfan5.

Posted: Thu Oct 31, 2013 23:51
by VanessaE
Sadly this does not work for me. The client of course runs, but standing water is just a greyish mass with dark, flickering pixels all over. :-( The sun/moon are right, at least.

Posted: Thu Oct 31, 2013 23:54
by Inocudom
VanessaE wrote:Sadly this does not work for me. The client of course runs, but standing water is just a greyish mass with dark, flickering pixels all over. :-( The sun/moon are right, at least.
What about the parallax mapping? Did you get it to work? What commands did you have to type into your minetest.conf file?

Posted: Fri Nov 01, 2013 00:11
by VanessaE
No, not as yet.

Posted: Fri Nov 01, 2013 01:08
by Inocudom
It appears that enable_parallaxmapping is the command that affects parallax mapping. 0 must mean that it is off, 1 must mean that it is in normal mode, and 2 must mean that it is in enhanced mode.

Posted: Fri Nov 01, 2013 13:02
by Inocudom
viewtopic.php?pid=116608#p116608
The above link leads to a new build that sfan5 made of this fork.

I tested the build and found the improvements to bump mapping to be a very welcoming sight (no more black cubes in the inventory.)

It looks like the water shaders don't quite work yet. Same issue as VanessaE got.

Parallax mapping appears to distort some of the features of the textures that use it.

Posted: Sun Nov 03, 2013 01:49
by hoodedice
For me, I get it all red. (Using sfan's build posted above.) Windows x86 XP with intel GMA