GLSL Shaders

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

GLSL Shaders

by RealBadAngel » Wed Oct 30, 2013 11:36

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/minetest-0.4.8-shaders.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 436 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

by jojoa1997 » Wed Oct 30, 2013 12:08

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

by Dan Duncombe » Wed Oct 30, 2013 12:15

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

by PilzAdam » Wed Oct 30, 2013 16:46

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

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

by Inocudom » Wed Oct 30, 2013 17:00

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Wed Oct 30, 2013 17:01

Nice.

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
engine.register_shader( "mat_node_1", {
    {"shader.hlsl","edriver_shader_vert","main_vert"}
})
 

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

by Inocudom » Wed Oct 30, 2013 17:24

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

by PilzAdam » Wed Oct 30, 2013 18:23

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: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Wed Oct 30, 2013 19:38

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: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Wed Oct 30, 2013 22:23

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.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Oct 30, 2013 23:45

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!

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by Inocudom » Thu Oct 31, 2013 14:38

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

by PilzAdam » Thu Oct 31, 2013 16:13

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.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Thu Oct 31, 2013 17:44

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...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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

by PilzAdam » Thu Oct 31, 2013 19:21

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...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Thu Oct 31, 2013 19:50

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

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Thu Oct 31, 2013 21:48

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: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Thu Oct 31, 2013 22:59

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

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

by Inocudom » Thu Oct 31, 2013 23:18

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
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Thu Oct 31, 2013 23:51

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 (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

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

by Inocudom » Thu Oct 31, 2013 23:54

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
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Nov 01, 2013 00:11

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

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

by Inocudom » Fri Nov 01, 2013 01:08

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: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Fri Nov 01, 2013 13:02

https://forum.minetest.net/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: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sun Nov 03, 2013 01:49

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
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sun Nov 03, 2013 01:52

hoodedice wrote: intel GMA
You will not be able to run shaders whatsoever.

Sorry bud.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Nov 03, 2013 02:00

the shaders only work on systems that are running opengl (though for me the water shader does not work at all).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Sun Nov 03, 2013 05:23

... DirectX is on, innit?
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

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

by Inocudom » Sun Nov 03, 2013 05:25

tinoesroho wrote:... DirectX is on, innit?


There aren't any Direct X shaders currently.
 

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

by RealBadAngel » Sun Nov 03, 2013 06:24

Inocudom wrote:
tinoesroho wrote:... DirectX is on, innit?


There aren't any Direct X shaders currently.


First lets have OpenGL up n runnin.

Vanessa's issue with water is definitely caused by Irrlicht 1.8
Current tree (i made many updates yesterday) is working under 1.7.3
 

Next

Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 6 guests

cron