Merge pull request #10314 from JosJuice/gles-lod-bias-float

GLES: Fix LOD bias int/float mismatch
This commit is contained in:
JosJuice 2021-12-28 19:52:39 +01:00 committed by GitHub
commit 2ab331dcdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ uint WrapCoord(int coord, uint wrap, int size) {{
if (!host_config.backend_sampler_lod_bias) if (!host_config.backend_sampler_lod_bias)
{ {
out.Write(" uint texmode0 = samp_texmode0(texmap);\n" out.Write(" uint texmode0 = samp_texmode0(texmap);\n"
" float lod_bias = {} / 256.0f;\n" " float lod_bias = float({}) / 256.0f;\n"
" return iround(255.0 * texture(tex, coords, lod_bias));\n", " return iround(255.0 * texture(tex, coords, lod_bias));\n",
BitfieldExtract<&SamplerState::TM0::lod_bias>("texmode0")); BitfieldExtract<&SamplerState::TM0::lod_bias>("texmode0"));
} }