Code cleanup, simplification

This commit is contained in:
Sascha Willems 2024-01-20 13:05:02 +01:00
parent 3dd195fe35
commit b92e210bbe
8 changed files with 285 additions and 396 deletions

View file

@ -6,6 +6,7 @@ layout (binding = 0) uniform UBO {
mat4 projection;
mat4 modelview;
mat4 inverseModelview;
float exposure;
} ubo;
layout (location = 0) in vec3 inUVW;
@ -22,10 +23,6 @@ layout (constant_id = 0) const int type = 0;
#define PI 3.1415926
#define TwoPI (2.0 * PI)
layout (binding = 2) uniform Exposure {
float exposure;
} exposure;
void main()
{
vec4 color;
@ -86,7 +83,7 @@ void main()
// Color with manual exposure into attachment 0
outColor0.rgb = vec3(1.0) - exp(-color.rgb * exposure.exposure);
outColor0.rgb = vec3(1.0) - exp(-color.rgb * ubo.exposure);
// Bright parts for bloom into attachment 1
float l = dot(outColor0.rgb, vec3(0.2126, 0.7152, 0.0722));