rsx/gl: Use strict method of gathering the depth buffer bits

- Performance difference on modern GPUs is negligible
This commit is contained in:
kd-11 2017-11-15 20:38:22 +03:00
parent 07f61db24a
commit 30269e5bad
1 changed files with 3 additions and 1 deletions

View File

@ -185,7 +185,9 @@ namespace gl
"void main()\n"
"{\n"
" vec4 rgba_in = texture(fs0, tc0);\n"
" gl_FragDepth = rgba_in.r * 0.99609 + rgba_in.g * 0.00389 + rgba_in.b * 0.00002;\n"
" uint raw_value = uint(rgba_in.b * 255.) | (uint(rgba_in.g * 255.) << 8) | (uint(rgba_in.r * 255.) << 16);\n"
" gl_FragDepth = float(raw_value) / 16777215.;\n"
" //gl_FragDepth = rgba_in.r * 0.99609 + rgba_in.g * 0.00389 + rgba_in.b * 0.00002;\n"
"}\n"
};
}