Chalnoth said:There is no 10-10-10-2 rendertarget available on current hardware. Using the alpha channel for exponent will have problems with situations where you have high color contrast between nearby pixels.
Humus said:Well, deferred rendering isn't widely used anyway.
I don't think it should be called deferred rendering as this has nothing to do with TBDR.
Zengar said:sRGB is "single" RGB, some sort of standard
http://www.w3.org/Graphics/Color/sRGB
But actually, RGB really doesn't present linear color space as light frequences behave non-linearly. Of course, such definition is a bit missleading.
Chalnoth said:There is no 10-10-10-2 rendertarget available on current hardware.
Chalnoth said:You mean shading? I don't think it should be called deferred rendering as this has nothing to do with TBDR.
Chalnoth said:Anyway, we'll see in about 1-2 years what support of HDR will be like. I expect 80% of games that support HDR in the next two years will do so only through FP16 buffers on SM3 hardware.
Hyp-X said:Well, it's available on ATI cards.
Altough there's no alpha blend and no AA support. (Which makes these formats kinda pointless.)
Oh, for art assets I can definitely believe that FP16 won't happen very quickly at all.Humus said:In two years maybe you'll see numbers like that, but I doubt that will be the average over the whole period. For art assets I doubt FP16 will ever become particularly dominant.
float4 output; // what would be the output of the old pixel shader
float4 outputs[2];
float4 exp;
........ // old code goes here
exp = int(log2(output));
outputs[0]=(exp + 128)/256;
outputs[1]=frac(output/pow(2,exp);
return outputs;
Chalnoth said:It'd be slow, and you couldn't ever use simple blending (you'd have to decode the framebuffer for every blend), but you would get full HDR.
Heh, looks like bloodbob deleted the post this is in reply to
// its a bit different cause I'm ignore the 4.12 stuff if your tone maping
// linearly on the fly low values generally don't matter that much as your
// most likely only interested in very bright values for alphas < 1.0 and bloom
float4 tonemappingconstant=somevalue; // a pre pass is done to get a tone mapping estimate
output=oldshaderoutput;
float4 outputs[2];
outputs[0]=frac( (output/tonemappingconstant)*256.0 );
outputs[1]=output-outputs[0]/256.0;
return outputs;
It can be worked around by lower the over-bright buffer. So your over bright buffer only worked between 16 and 1/16 that way if you blend 1.01 and 0.99 you get 0.5 ( [0.01+0.99]/2 ) in the LDR buffer and 0.5 ( [1.0 + 0.0]/2 ) in the Over bright buffer and on your final pass you add them to getter and get 1.0.Chalnoth said:Edit:
And storing the framebuffer in two parts like that would likely have huge problems with blending for values just above 1, unless you also decoded the framebuffer just like you'd have to do with the soft-FP thing I put up above. After all, a value of 1.01 blended with 0.99 would blend to 0.5 if you just do a straight blend with that encoding.
Are you saying you're basically intentionally leaving the last bit blank in the overbright buffer through a proper truncation? I suppose that'd work, but would drop your dynamic range by a factor of two.bloodbob said:It can be worked around by lower the over-bright buffer. So your over bright buffer only worked between 16 and 1/16 that way if you blend 1.01 and 0.99 you get 0.5 ( [0.01+99]/2 ) in the LDR buffer and 0.5 ( [1.0 + 0.0]/2 ) in the Over bright buffer and on your final pass you add them to getter and get 1.0.
Well as many bits as you want ( I actually said 4 bits in the post just above ) so you get proper trunaction. Yeah it would drop the dynamic range then again we are only using 0.0-16.0 range with the texture in the first place and we don't really particularly care about the lower end of the range if your pre tone mapping. But yeah frankly I can't really see anyone using this. ( you could always use a 3rd MRT though this would hurt fillrate and mem bandwidth and memory )Chalnoth said:Are you saying you're basically intentionally leaving the last bit blank in the overbright buffer through a proper truncation? I suppose that'd work, but would drop your dynamic range by a factor of two.
Yeah but if your encoding data in the alpha channel how are you supposed to do alpha blends. In importance I rank things in the following Alpha Blend > texture filtering ( you can emulate blinear easily enough using shaders ) > HDR > AA.vember said:I was more thinking along the lines of encoding a monochrome high-range/low-precision version of the rgb-value in the alpha-channel and using it only for bloom. The range aspects besides bloom would be taken care of by scaling brightness in the shader depending on the desired exposure. Well it isn't perfect, but then again it would be quite suprising if valve's solution were.
bloodbob said:Yeah but if your encoding data in the alpha channel how are you supposed to do alpha blends. In importance I rank things in the following Alpha Blend > texture filtering ( you can emulate blinear easily enough using shaders ) > HDR > AA.
Ehh the alpha blend surfaces aren't supposed to obstruct a bloom (well not in HDR). I could be wrong but when you alphablend with an alpha value of say 0.9 isn't 0.9 written to the frame buffer? If so then when you read the alpha value out of the frame buffer isn't it going to be 0.9? Won't such a high number bloom even if the pixel are a really low value ( such as blending black box with 10% transparency ).vember said:The alpha-blended surfaces does obstruct blooms just fine however.