Sign in to follow this  
gtpdz

Handle blending in RGBM HDR rt

Recommended Posts

gtpdz    100
Hello,

As we know RGBM is a good format for HDR data encoding. But using the alpha channel as the luminance rules out hardware additive blending. So how do you handle blending in RGBM render target? Besides using some off-screen composing technique, are there any alternatives?

Share this post


Link to post
Share on other sites
MJP    19755
You either do the blending manually in the shader (either by ping-ponging between render targets or by reading back the render target on hardware that supports it) or your resolve to a fp16 target and do your blending with that.

Share this post


Link to post
Share on other sites
gtpdz    100
Hi MJP,

Thanks for the reply~:) Now I am using a technique similar as doing glass refraction(by reading back the render target as you mentioned) and doing a Decode->blending->Encode in my shader. But this trick requires some extra shader code and have some potential problem with depth sorting. So can I just hack into the luminance channel and do some simple additive blending and multiply blending for the RGB channel?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this