Implement HDR support for Windows (#825)

This commit is contained in:
Cameron Gutman
2023-01-25 19:48:55 -06:00
committed by GitHub
parent 1f2ad8da00
commit bcd5188ac5
9 changed files with 369 additions and 57 deletions

View File

@@ -0,0 +1,22 @@
Texture2D image : register(t0);
SamplerState def_sampler : register(s0);
struct PS_INPUT
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD;
};
cbuffer SdrScaling : register(b0) {
float scale_factor;
};
float4 main_ps(PS_INPUT frag_in) : SV_Target
{
float4 rgba = image.Sample(def_sampler, frag_in.tex, 0);
rgba.rgb = rgba.rgb * scale_factor;
return rgba;
}