glsl: fix a bug in urban chaos hle shader

Bug only impact the lsb bits of the depth conversion, so impact is likely small
This commit is contained in:
Gregory Hainaut 2016-05-06 19:55:12 +02:00
parent 70ee8c5bc4
commit d5681ba01c
2 changed files with 2 additions and 2 deletions

View File

@ -246,7 +246,7 @@ vec4 sample_depth(vec2 st)
int depth = fetch_raw_depth();
// Convert lsb based on the palette
t = texelFetch(PaletteSampler, ivec2((depth & 0xFF), 0), 0);
t = texelFetch(PaletteSampler, ivec2((depth & 0xFF), 0), 0) * 255.0f;
// Msb is easier
float green = float((depth >> 8) & 0xFF) * 36.0f;

View File

@ -1090,7 +1090,7 @@ static const char* const tfx_fs_all_glsl =
" int depth = fetch_raw_depth();\n"
"\n"
" // Convert lsb based on the palette\n"
" t = texelFetch(PaletteSampler, ivec2((depth & 0xFF), 0), 0);\n"
" t = texelFetch(PaletteSampler, ivec2((depth & 0xFF), 0), 0) * 255.0f;\n"
"\n"
" // Msb is easier\n"
" float green = float((depth >> 8) & 0xFF) * 36.0f;\n"