• 13
• 14
• 27
• 9
• 9

# Critique of a Generic HDR Implementation

This topic is 4825 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all, Been doodling away on a bit of paper the last couple of days - trying to work out if and how I might be able to come up with a generic HDR implementation for a DirectX9 based graphics engine... Anyone care to give me some thoughts on my ideas - I'm not convinced it'll work, but it's about as good as I've managed so far. The key idea is that I can "plug in" any of the output forms (LDR/FakeHDR/TrueHDR) and maintain the core rendering processes as the same to maintain a form of transparency as to what the final output was. This would offer both: - easier development (to get the ball rolling, I could just use the LDR stuff) - backwards compatability (for the hardware that can't do True HDRI)
Interface IRenderOutputManager
{
bool IsSupported( )
void CreateResources( )
void BeginFrame( )
void FinishFrame( )
void CleanupResources( )
}

I'd then use it in the following sort of structure:
//Start a new frame...
IRenderOutputManager::BeginFrame( )
//Render all geometry as usual here
IRenderOutputManager::FinishFrame( )
//Everything done here

In the typical LDR/default mode IRenderOutputManager::BeginFrame( ) - calls a "Clear()" operation - calls a "BeginScene()" operation IRenderOutputManager::FinishFrame( ) - calls a "EndScene()" operation - calls a "Present()" operation Yet the HDR ones can take the same opportunity to swap the render targets, perform the necessary post-processing effects (e.g. bloom and luminance mapping).. It all seems quite tidy to me from what I can see... for one problem: The rendering of objects might need to change slightly depending on the type of output. A typical LDR output would require all colours are [0..255] or [0.0 - 1.0] to work, whereas the true HDR output would require colours, obviously, of higher dynamic range. Is it actually possible to abstract this sort of thing? Or would all the general game/terrain/level/whatever geometry and effect rendering have to change as well as the LDR/HDR type output? Any thoughts are greatly appreciated! Cheers, Jack