Updated hlsl shaders

This commit is contained in:
Sascha Willems 2024-01-20 13:06:04 +01:00
parent b92e210bbe
commit dfcc55b6d5
3 changed files with 2 additions and 6 deletions

View file

@ -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));

Binary file not shown.

Binary file not shown.