add compute shader to auto calculate screen exposure, add SSBO impl
This commit is contained in:
@ -23,7 +23,14 @@ in vec2 v_TexCoord;
|
||||
|
||||
uniform sampler2DMS u_Texture;
|
||||
|
||||
uniform float u_Exposure;
|
||||
|
||||
uniform bool u_EnableAutoExposure;
|
||||
uniform float u_ManualExposure;
|
||||
layout(std430, binding = 2) buffer Exposure
|
||||
{
|
||||
float u_Exposure;
|
||||
};
|
||||
|
||||
uniform int u_TextureSamples;
|
||||
|
||||
uniform bool u_EnableBloom;
|
||||
@ -64,7 +71,10 @@ void main()
|
||||
color += bloomColor;
|
||||
}
|
||||
|
||||
color *= u_Exposure;
|
||||
if(u_EnableAutoExposure)
|
||||
color *= u_Exposure;
|
||||
else
|
||||
color *= u_ManualExposure;
|
||||
|
||||
// Reinhard tonemapping operator.
|
||||
// see: "Photographic Tone Reproduction for Digital Images", eq. 4
|
||||
|
||||
Reference in New Issue
Block a user