[shaders]Bloom + Better Light

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

noob team then :D
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

lol I have looked at the code a bit and most of what you need to work with are these files and folders.
src/client/render
src/game.cpp
src/clientmap.cpp
I don't make messes, I just, er...disturb the local entropy!

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

Need any help? I'm crap at graphics of all kind but I can refactor and do code cleanup + test.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

LMP might like some. I'm so helpless, hopless (and somewhat useless).
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

Complete ignorance here but looks like there is some *.glsl stuff in the master/client/shaders code already. Why would there need to be modifications to the core engine?

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

you wouldn't need to actually. the core itself doesn't need any change. (AFAIK)
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [shaders]Bloom + Better Light

by TumeniNodes » Post

Skulls wrote:Complete ignorance here but looks like there is some *.glsl stuff in the master/client/shaders code already. Why would there need to be modifications to the core engine?
someone with experience, and who knows the dark side of the maths is needed. : )

basically, the community is awaiting the coming of Lord Dropmyfps
A Wonderful World

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

I've burned an EULA and set out some caffeine, chanted "turn it off and on again" 8 times. Hopefully the ritual works.

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

Skulls, we nee the core change to provide us with the information necessary to create shadows, etc.
I don't make messes, I just, er...disturb the local entropy!

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [shaders]Bloom + Better Light

by LMD » Post

azekill_DIABLO wrote:you wouldn't need to actually. the core itself doesn't need any change. (AFAIK)
Sorry, but you're wrong here. I have already seen this shaders, and AFAIK, there's actually no post-processing stage.
My stuff: Projects - Mods - Website

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

ThomasMonroe wrote:Skulls, we nee the core change to provide us with the information necessary to create shadows, etc.
Okay, so bubble up / expose info on light sources? What else is part of the etc?

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

LMD wrote:there's actually no post-processing stage.
About where in the code would you expect the post-processing state to be, ideally? And what kind of things would happen in post-processing (pretty water, shadows, etc)?

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [shaders]Bloom + Better Light

by azekill_DIABLO » Post

Okay for this LMD.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

Skulls wrote:
LMD wrote:there's actually no post-processing stage.
About where in the code would you expect the post-processing state to be, ideally? And what kind of things would happen in post-processing (pretty water, shadows, etc)?
the water is just shader magic XD, but you need more render passes in order to have reflections.
shadows need a render pass.
post processing would be for image effects, such as bloom, blur, etc.

it would take place on the rendered image, after the water , shadows and other things get drawn.
I don't make messes, I just, er...disturb the local entropy!

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

Here are my sources:

Minetest shader.cpp https://github.com/minetest/minetest/bl ... shader.cpp
Irrlicht shader doc / tutorial http://irrlicht.sourceforge.net/docu/example010.html
Irrlicht forum post on shadows http://irrlicht.sourceforge.net/forum/v ... ws#p302549

In shader.cpp would you expect to see some changes to the load_shaders() method with a shadow_program section? The multiple passes required isn't obvious to me from the Irrlicht tutorial so I'm flailing around (obviously :) ).

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [shaders]Bloom + Better Light

by LMD » Post

Skulls wrote:Here are my sources:

Minetest shader.cpp https://github.com/minetest/minetest/bl ... shader.cpp
Irrlicht shader doc / tutorial http://irrlicht.sourceforge.net/docu/example010.html
Irrlicht forum post on shadows http://irrlicht.sourceforge.net/forum/v ... ws#p302549

In shader.cpp would you expect to see some changes to the load_shaders() method with a shadow_program section? The multiple passes required isn't obvious to me from the Irrlicht tutorial so I'm flailing around (obviously :) ).
Nice work, Skulls ! Really helpful !
To answer your questions : (1) As ThomasMonroe mentioned, for shadows & reflections, a 2nd rendering pass is required. Also, most rendering techniques can only be used efficiently with post-processing. Let's take specular lighting for example. Implementing it in one pass - easy. But let's say there's a huge structure, with many triangles - and for each fragment of each triangle you have to calculate lighting - a huge amount of gpu power is required to make this run at 25 fps ! But, if you render face normals on a FBO, as well as the scene, you can "light up" the rendered scene, what means calculating specular lighting for the fragments of 2 triangles. You see - post-processing is required for :
(a) Efficiency -> high FPS, keep in mind this is a game, and not a movie-making software
(b) Nice effects that are done using post-processing -> night-vision, cartoon/toon-filter, edgefinders, shadows, ambient occlusion, etc...
My stuff: Projects - Mods - Website

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

Thanks for the info! Is this http://irrlicht.sourceforge.net/forum/v ... ss#p299914 something along the lines of a reasonable starting point for multi pass rendering?

One thing I really enjoy about Minetest is that it is available to folks who don't have the latest and greatest gaming rigs so any multi pass black magic would have to be an optional type of thing, and hopefully enabled by an in game menu option but probably starting out as a build param. I've got a fairly decent rig and want to help see the blocks all sparkly but still want to ensure a good play experience for anyone who can run the base specs.

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [shaders]Bloom + Better Light

by LMD » Post

No clue where you always find these articles, but yes, it is. The left side of the image in the bottom right corner is a normalmap. On the other side, there's the depthmap, relevant for almost every effect. In the bottom left corner, there's the rendered image without any lighting. Using this values, in the top left corner, the lit scene can be seen. The top right corner shows the "darkness" values. Notice it's not only lighting, but also ambient occlusion : Corners of the model are darker.
My stuff: Projects - Mods - Website

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

Okidoki then, this is what I've got. Things needed for fancy smancy graphics in Minetest:
  • Code branch
  • Types of shaders and levels defined (shadows, super fancy shadows, bloom + level, fancy water, etc)
  • Enable / disable option without recompiling per shader type
  • Defaults for render object materials for when shader info is not present
  • Shaders written per type + level
  • Game render loop extended to include multi pass rendering
  • No shader game tested and performance tuned
  • Low end shader game tested and performance tuned
  • 'Ultra' shader game tested and performance tuned
  • Wiki written
  • Shader binaries distributed to community for testing and evaluation
  • Enthusiasm and joy for shaders
  • Tears and despair at all the bugs
  • Moar fixes and testing
  • Pull request to main Minetest code initiated
What am I missing?

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [shaders]Bloom + Better Light

by LMD » Post

I see a manager/teamleader talent :)
1. We'll do in GitHub
3. We should compile them during initialization
My stuff: Projects - Mods - Website

User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

Skulls wrote:Okidoki then, this is what I've got. Things needed for fancy smancy graphics in Minetest:
  • Code branch
  • Types of shaders and levels defined (shadows, super fancy shadows, bloom + level, fancy water, etc)
  • Enable / disable option without recompiling per shader type
  • Defaults for render object materials for when shader info is not present
  • Shaders written per type + level
  • Game render loop extended to include multi pass rendering
  • No shader game tested and performance tuned
  • Low end shader game tested and performance tuned
  • 'Ultra' shader game tested and performance tuned
  • Wiki written
  • Shader binaries distributed to community for testing and evaluation
  • Enthusiasm and joy for shaders
  • Tears and despair at all the bugs
  • Moar fixes and testing
  • Pull request to main Minetest code initiated
What am I missing?
Shaders are compiled at load time, so they do not need to be in their binary format, what would need to happen is the shaders would need to be distributed like mods.
I don't make messes, I just, er...disturb the local entropy!

User avatar
AccidentallyRhine
Member
Posts: 252
Joined: Sun Aug 02, 2015 05:43

Re: [shaders]Bloom + Better Light

by AccidentallyRhine » Post


User avatar
ThomasMonroe
Member
Posts: 286
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared
Location: Wherever I am at

Re: [shaders]Bloom + Better Light

by ThomasMonroe » Post

all that needs to be done with that is updating "mShadowmatrix"
I don't make messes, I just, er...disturb the local entropy!

Skulls
Member
Posts: 108
Joined: Thu Dec 21, 2017 17:41
In-game: Skulls

Re: [shaders]Bloom + Better Light

by Skulls » Post

ThomasMonroe wrote: Shaders are compiled at load time, so they do not need to be in their binary format, what would need to happen is the shaders would need to be distributed like mods.
I thought if we want multi pass, enable / disable shader attributes or levels we will need a new client binary and I *think* thats what I was calling the 'shader binary': modified client binary + shaders. Or I hope thats what I was thinking.

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [shaders]Bloom + Better Light

by Byakuren » Post

Color lighting is doable, but it wouldn't work quite right due to the way ambient lighting is approximated in Minetest. It might look "good enough" for inclusion, though.

See these blog posts I found for more info:
https://www.seedofandromeda.com/blogs/2 ... -game-pt-1
https://www.seedofandromeda.com/blogs/3 ... -game-pt-2
Every time a mod API is left undocumented, a koala dies.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests