GLSL Shaders

User avatar
RealBadAngel
Member
Posts: 557
Joined: Wed Jul 18, 2012 16:30

GLSL Shaders

by RealBadAngel » Post

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
Attachments
terraintest.zip
(10.71 MiB) Downloaded 712 times
Last edited by RealBadAngel on Wed Nov 27, 2013 07:24, edited 1 time in total.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

I know this is stupid but how would I add a shader to the game? Also good job. Finally minetest has nice shaders.
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Dan Duncombe
Member
Posts: 904
Joined: Thu May 09, 2013 21:11
Location: In the unknown depths of Earth

by Dan Duncombe » Post

I assume we will still be able to disable shaders? My computer can't cope with them.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

The water looks good (the rest isnt that impressive).
Also, why do you create a second topic for it?

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.
Last edited by Inocudom on Wed Oct 30, 2013 17:02, edited 1 time in total.

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

by rubenwardy » Post

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"}
})
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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?
Last edited by PilzAdam on Wed Oct 30, 2013 18:24, edited 1 time in total.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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?

User avatar
RealBadAngel
Member
Posts: 557
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Post

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.
Last edited by RealBadAngel on Wed Oct 30, 2013 22:26, edited 1 time in total.

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

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!

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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.

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

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
Last edited by sfan5 on Thu Oct 31, 2013 17:44, edited 1 time in total.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

So this could mean that the shaders are not in sfan5's build of this branch?

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

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.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
RealBadAngel
Member
Posts: 557
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Post

Sorry, my fault. Ive cloned wrong repo...
Im pushing now correct sources.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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?

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

No, not as yet.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

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.
Last edited by Inocudom on Fri Nov 01, 2013 16:12, edited 1 time in total.

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

For me, I get it all red. (Using sfan's build posted above.) Windows x86 XP with intel GMA
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests