GLSL Shaders

User avatar
RealBadAngel
Member
 
Posts: 557
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 433 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 » 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
Location: In the unknown depths of Earth

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
Location: Germany
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: 3063
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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
rubenwardy
Moderator
 
Posts: 5835
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
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:

Code: Select all
engine.register_shader( "mat_node_1", {
    {"shader.hlsl","edriver_shader_vert","main_vert"}
})
 

User avatar
Inocudom
Member
 
Posts: 3063
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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
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: 3063
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?
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
RealBadAngel
Member
 
Posts: 557
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: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
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!
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Inocudom
Member
 
Posts: 3063
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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
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
Moderator
 
Posts: 3810
Joined: Wed Aug 24, 2011 09:44
Location: Germany
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...
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
Location: Germany
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...
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: 3063
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?
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
sfan5
Moderator
 
Posts: 3810
Joined: Wed Aug 24, 2011 09:44
Location: Germany
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: 557
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: 3063
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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

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

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 (64-512px)
 

User avatar
Inocudom
Member
 
Posts: 3063
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?
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

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

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 (64-512px)
 

User avatar
Inocudom
Member
 
Posts: 3063
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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

User avatar
Inocudom
Member
 
Posts: 3063
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.
The comedic value of my videos is how abysmal they are: https://www.youtube.com/channel/UC5cyeM ... YTfYFlih_A
 

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

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
 

Next

Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 1 guest