A curiosity, but how possible would it be for the new renderer to support HDR rendering? I don't mean it in so much of a "shiny bloom" sense, but one of the issues I've seen with dynamic lights is that, when placed in a (nearly) full-bright sector, it essentially has no effect because the brightness can't go any higher. However, if GZDoom could render to, say, an RGB16F texture with color clamping turned off, if would allow full-bright walls to render with even brighter color values. Then if that could be combined with a simple screen dimming method (brighten or darken the scene depending on how dark or bright the scene actually is), it could add a lot more ambiance to the dynamic lighting whether it's in a full-bright or low brightness scene.
Just an idea.
HDR Rendering
Moderator: Graf Zahl
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
Re: HDR Rendering
Have a look at this code fragment from the main shader:
It's not operational yet and obviously the 1.2 is rather arbitrary - but this will of course change once it works. (FYI, frag is the light color the texel gets multiplied with.) But this is as far as my plans go for now.
Code: Select all
#ifdef DYNLIGHT
frag += dynlight;
frag = clamp(frag, 0.0, 1.2);
#endif
It's not operational yet and obviously the 1.2 is rather arbitrary - but this will of course change once it works. (FYI, frag is the light color the texel gets multiplied with.) But this is as far as my plans go for now.
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
Re: HDR Rendering
The new lighting code is working. Now I need ideas how to expose this to the mapper. Any ideas from people who got some experience?
-
- Stronghold Team
- Posts: 3555
- Joined: Sun Nov 13, 2005 23:15
- Location: Germany
Re: HDR Rendering
What actually do you mean by "working"? What are the possibilities?
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
Re: HDR Rendering
The possibilies are endless. So far it's just 'working', i.e. it produces results - nothing special yet.
-
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: HDR Rendering
Previously, all that was possible was point lights. Is it now possible to have directional lights? Volumetric light and shadow? How about Legacy-style corona effects?
For instance, what about the following threads, which had been rejected previously because of how dynlights were implemented previously:
http://forum.drdteam.org/viewtopic.php?f=40&t=2391
http://forum.drdteam.org/viewtopic.php?f=40&t=580
For instance, what about the following threads, which had been rejected previously because of how dynlights were implemented previously:
http://forum.drdteam.org/viewtopic.php?f=40&t=2391
http://forum.drdteam.org/viewtopic.php?f=40&t=580
Last edited by Gez on Sat Oct 10, 2009 19:54, edited 1 time in total.
-
- Developer
- Posts: 4752
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
Re: HDR Rendering
Directional lights and light cones (whatever the correct term is), if they are possible, would be very nice to allow things like this to be done properly:




-
- Posts: 14
- Joined: Tue Jul 14, 2009 22:31
-
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
Re: HDR Rendering
Directional lights, yes, albeit with the same clipping restrictions as point lights, i.e. no shadows. But this may take a little. Right now I'm cleaning up for a new release. It'd be after that.Gez wrote:Previously, all that was possible was point lights. Is it now possible to have directional lights? Volumetric light and shadow? How about Legacy-style corona effects?
For instance, what about the following threads, which had been rejected previously because of how dynlights were implemented previously:
http://forum.drdteam.org/viewtopic.php?f=40&t=2391
http://forum.drdteam.org/viewtopic.php?f=40&t=580
Volumetric light - no idea. I don't think it can be handled with Doom levels.