mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
VideoBackends: Floor depth values in depth copy shaders.
This commit is contained in:
parent
be810eb750
commit
b0770e2a0c
@ -146,7 +146,7 @@ const char depth_matrix_program[] = {
|
||||
" in float4 pos : SV_Position,\n"
|
||||
" in float3 uv0 : TEXCOORD0){\n"
|
||||
" float4 texcol = Tex0.Sample(samp0,uv0);\n"
|
||||
" int depth = int(round(texcol.x * 16777216.0));\n"
|
||||
" int depth = int(floor(texcol.x * 16777216.0));\n"
|
||||
|
||||
// Convert to Z24 format
|
||||
" int4 workspace;\n"
|
||||
@ -180,7 +180,7 @@ const char depth_matrix_program_msaa[] = {
|
||||
" for(int i = 0; i < SAMPLES; ++i)\n"
|
||||
" texcol += Tex0.Load(int3(uv0.x*(width), uv0.y*(height), uv0.z), i);\n"
|
||||
" texcol /= SAMPLES;\n"
|
||||
" int depth = int(round(texcol.x * 16777216.0));\n"
|
||||
" int depth = int(floor(texcol.x * 16777216.0));\n"
|
||||
|
||||
// Convert to Z24 format
|
||||
" int4 workspace;\n"
|
||||
|
@ -294,7 +294,7 @@ void TextureCache::CompileShaders()
|
||||
"\n"
|
||||
"void main(){\n"
|
||||
" vec4 texcol = texture(samp9, vec3(f_uv0.xy, %s));\n"
|
||||
" int depth = int(round(texcol.x * 16777216.0));\n"
|
||||
" int depth = int(floor(texcol.x * 16777216.0));\n"
|
||||
|
||||
// Convert to Z24 format
|
||||
" ivec4 workspace;\n"
|
||||
|
Loading…
Reference in New Issue
Block a user