Jump to content
  • Advertisement
Sign in to follow this  
InvalidPointer

DX11 Combining color spaces and high-precision render targets

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just wondering if anyone out there has experimented with using some of the perceptual color models (i.e. LogLUV/NAO32, etc.) with high-precision (maybe FP, but not strictly required) render targets. Ideally I'd like to have some variant on LUV for its coloration properties, but am unsure of what I would hypothetically need to mess around with in order to swap it over to work with more 'traditional' HDR light buffers. For context, I'm working with DX10.1/DX11 and using a deferred shader. Hardware format-wise I'm evaluating R11G11B10F and potentially using more suitable color spaces in order to eke out a bit more dynamic range. I have no problem with jumping back to fixed-point RGBA8 (alpha blending isn't an issue as it's being handled separately anyway) if there's no benefit, but still. Also, considering that deferred shading is pretty much founded on additive lighting that's a big necessity too-- or at least something functionally equivalent. Thoughts/suggestions?

Share this post


Link to post
Share on other sites
Advertisement
I've used LogLuv quite a bit and I've never had precision issues with fixed-point RGBA8. 16-bits for luminance has been plenty, in my experience. But of course you lose the alpha channel and you can't blend into the framebuffer, which makes life difficult. Of course the only thing keeping you from blending is the fact that log(luminance) is stored across two components, so if you stuck it into its own 16-bit component you would be able to blend again. You'd also have plenty of precision for u and v. However this isn't something I've personally tried.

Share this post


Link to post
Share on other sites
LUV isn't alpha-blendable. Calculating uv' requires you to know the previous value of uv. I would like to take this opportunity to shamelessly pimp my article in ShaderX7 which describes a decent method for blending LUV colors, without doing a massive amount of data copying. It is still way more expensive than simply alpha-blending, because you do need to copy target data into a scratch target (ping-ponging does not work because, again, you need the contents of the target).

Share this post


Link to post
Share on other sites
Quote:
Original post by patw
LUV isn't alpha-blendable. Calculating uv' requires you to know the previous value of uv. I would like to take this opportunity to shamelessly pimp my article in ShaderX7 which describes a decent method for blending LUV colors, without doing a massive amount of data copying. It is still way more expensive than simply alpha-blending, because you do need to copy target data into a scratch target (ping-ponging does not work because, again, you need the contents of the target).

Out of curiosity, how would converting it to RGB beforehand fare? I'm thinking I could use one of those fancy lower-resolution particle buffers or other such fanciness, rendering to (LDR) RGBA8, then do a 'convolution' of sorts, converting the LUV lighting buffer over to RGB, tonemapping(?) and then blending the alpha buffer into the main framebuffer.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!