HDR Rendering

Moderator: Graf Zahl

Chris
Posts: 29
Joined: Fri Nov 28, 2008 1:18

HDR Rendering

Post by Chris »

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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: HDR Rendering

Post by Graf Zahl »

Have a look at this code fragment from the main shader:

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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: HDR Rendering

Post by Graf Zahl »

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?
User avatar
Tormentor667
Stronghold Team
Posts: 3555
Joined: Sun Nov 13, 2005 23:15
Location: Germany

Re: HDR Rendering

Post by Tormentor667 »

What actually do you mean by "working"? What are the possibilities?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: HDR Rendering

Post by Graf Zahl »

The possibilies are endless. So far it's just 'working', i.e. it produces results - nothing special yet.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: HDR Rendering

Post by Gez »

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
Last edited by Gez on Sat Oct 10, 2009 19:54, edited 1 time in total.
User avatar
Enjay
Developer
Developer
Posts: 4752
Joined: Tue Aug 30, 2005 23:19
Location: Scotland

Re: HDR Rendering

Post by Enjay »

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:

Image

Image
User avatar
Cherepoc
Posts: 14
Joined: Tue Jul 14, 2009 22:31

Re: HDR Rendering

Post by Cherepoc »

wow! what about shader water with reflections? :lol:
Ahaha oh wow!
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany

Re: HDR Rendering

Post by Graf Zahl »

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


Volumetric light - no idea. I don't think it can be handled with Doom levels.

Return to “Closed Feature Suggestions”