GS-hw: Fix d3d11 depth sample shader.

Also adjust some comments to match updated shader names.
This commit is contained in:
lightningterror 2022-02-18 19:21:01 +01:00
parent 816ee9e545
commit 1a3d77b2c0
3 changed files with 7 additions and 7 deletions

View File

@ -390,7 +390,7 @@ float4 sample_depth(float2 st, float2 pos)
}
else if (PS_DEPTH_FMT == 1)
{
// Based on ps_main11 of convert
// Based on ps_convert_float32_rgba8 of convert
// Convert a FLOAT32 depth texture into a RGBA color texture
uint d = uint(fetch_c(uv).r * exp2(32.0f));
@ -398,11 +398,11 @@ float4 sample_depth(float2 st, float2 pos)
}
else if (PS_DEPTH_FMT == 2)
{
// Based on ps_main12 of convert
// Based on ps_convert_float16_rgb5a1 of convert
// Convert a FLOAT32 (only 16 lsb) depth into a RGB5A1 color texture
uint d = uint(fetch_c(uv).r * exp2(32.0f));
t = float4(uint4((d & 0x1Fu), ((d >> 5) & 0x1Fu), ((d >> 10) & 0x1Fu), (d >> 15) & 0x01u));
t = float4(uint4((d & 0x1Fu), ((d >> 5) & 0x1Fu), ((d >> 10) & 0x1Fu), (d >> 15) & 0x01u)) * float4(8.0f, 8.0f, 8.0f, 128.0f);
}
else if (PS_DEPTH_FMT == 3)
{

View File

@ -326,13 +326,13 @@ vec4 sample_depth(vec2 st)
#elif PS_DEPTH_FMT == 1
// Based on ps_main11 of convert
// Based on ps_convert_float32_rgba8 of convert
// Convert a GL_FLOAT32 depth texture into a RGBA color texture
uint d = uint(fetch_c(uv).r * exp2(32.0f));
t = vec4(uvec4((d & 0xFFu), ((d >> 8) & 0xFFu), ((d >> 16) & 0xFFu), (d >> 24)));
#elif PS_DEPTH_FMT == 2
// Based on ps_main12 of convert
// Based on ps_convert_float16_rgb5a1 of convert
// Convert a GL_FLOAT32 (only 16 lsb) depth into a RGB5A1 color texture
uint d = uint(fetch_c(uv).r * exp2(32.0f));
t = vec4(uvec4((d & 0x1Fu), ((d >> 5) & 0x1Fu), ((d >> 10) & 0x1Fu), (d >> 15) & 0x01u)) * vec4(8.0f, 8.0f, 8.0f, 128.0f);

View File

@ -650,7 +650,7 @@ vec4 sample_depth(vec2 st, ivec2 pos)
}
#elif (PS_DEPTH_FMT == 1)
{
// Based on ps_main11 of convert
// Based on ps_convert_float32_rgba8 of convert
// Convert a vec32 depth texture into a RGBA color texture
uint d = uint(fetch_c(uv).r * exp2(32.0f));
@ -658,7 +658,7 @@ vec4 sample_depth(vec2 st, ivec2 pos)
}
#elif (PS_DEPTH_FMT == 2)
{
// Based on ps_main12 of convert
// Based on ps_convert_float16_rgb5a1 of convert
// Convert a vec32 (only 16 lsb) depth into a RGB5A1 color texture
uint d = uint(fetch_c(uv).r * exp2(32.0f));