diff --git a/shaders/hlsl/hdr/gbuffer.frag b/shaders/hlsl/hdr/gbuffer.frag index 4e412a75..c1fdafc2 100644 --- a/shaders/hlsl/hdr/gbuffer.frag +++ b/shaders/hlsl/hdr/gbuffer.frag @@ -27,15 +27,11 @@ struct UBO { float4x4 projection; float4x4 modelview; float4x4 inverseModelview; + float exposure; }; cbuffer ubo : register(b0) { UBO ubo; } -cbuffer Exposure : register(b2) -{ - float exposure; -} - FSOutput main(VSOutput input) { FSOutput output = (FSOutput)0; @@ -97,7 +93,7 @@ FSOutput main(VSOutput input) // Color with manual exposure into attachment 0 - output.Color0.rgb = float3(1.0, 1.0, 1.0) - exp(-color.rgb * exposure); + output.Color0.rgb = float3(1.0, 1.0, 1.0) - exp(-color.rgb * ubo.exposure); // Bright parts for bloom into attachment 1 float l = dot(output.Color0.rgb, float3(0.2126, 0.7152, 0.0722)); diff --git a/shaders/hlsl/hdr/gbuffer.frag.spv b/shaders/hlsl/hdr/gbuffer.frag.spv index 5cdc4e28..022e1da1 100644 Binary files a/shaders/hlsl/hdr/gbuffer.frag.spv and b/shaders/hlsl/hdr/gbuffer.frag.spv differ diff --git a/shaders/hlsl/hdr/gbuffer.vert.spv b/shaders/hlsl/hdr/gbuffer.vert.spv index 37919648..c55b04bc 100644 Binary files a/shaders/hlsl/hdr/gbuffer.vert.spv and b/shaders/hlsl/hdr/gbuffer.vert.spv differ