[Scummvm-git-logs] scummvm master -> 84a31481fa70b56140ca5e62edf9cb287a7d3e7b
lephilousophe
noreply at scummvm.org
Mon Apr 28 18:19:33 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
84a31481fa BACKENDS: OPENGL: Improve precision of CLUT lookup
Commit: 84a31481fa70b56140ca5e62edf9cb287a7d3e7b
https://github.com/scummvm/scummvm/commit/84a31481fa70b56140ca5e62edf9cb287a7d3e7b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-04-28T20:19:09+02:00
Commit Message:
BACKENDS: OPENGL: Improve precision of CLUT lookup
This is a followup of 3112fad5fa9d9676e18a894494f05bf20957d51a and tries
to definitely fix Trac#15860.
Use a medium precision when looking up the pixel palette index.
Using a low precision (the default) may loose precision on normalized
values.
Changed paths:
backends/graphics/opengl/shader.cpp
graphics/opengl/shader.cpp
diff --git a/backends/graphics/opengl/shader.cpp b/backends/graphics/opengl/shader.cpp
index 2f2c91be632..dd53a0fed59 100644
--- a/backends/graphics/opengl/shader.cpp
+++ b/backends/graphics/opengl/shader.cpp
@@ -68,7 +68,7 @@ const char *const g_lookUpFragmentShader =
"varying vec2 texCoord;\n"
"varying vec4 blendColor;\n"
"\n"
- "uniform sampler2D shaderTexture;\n"
+ "uniform mediump sampler2D shaderTexture;\n"
"uniform sampler2D palette;\n"
"\n"
"const float scaleFactor = 255.0 / 256.0;\n"
diff --git a/graphics/opengl/shader.cpp b/graphics/opengl/shader.cpp
index f625d2d4ab9..efc5b289c89 100644
--- a/graphics/opengl/shader.cpp
+++ b/graphics/opengl/shader.cpp
@@ -58,6 +58,7 @@ static const char *const compatFragment =
"#define outColor gl_FragColor\n"
"#define texture texture2D\n"
"#elif __VERSION__ < 130\n"
+ "#define mediump\n"
"#define in varying\n"
"#define OUTPUT\n"
"#define outColor gl_FragColor\n"
More information about the Scummvm-git-logs
mailing list