# HG changeset patch # User Sebastien Jodogne # Date 1666956036 -7200 # Node ID ee68ee732aa7fe820c3f7d70b9e146b3b313ca99 # Parent ed5a0b9183dcaf0d386cadb45da3fdca65a7c028 fix OpenGL shader for floating-point textures diff -r ed5a0b9183dc -r ee68ee732aa7 OrthancStone/Sources/Scene2D/Internals/OpenGLFloatTextureProgram.cpp --- a/OrthancStone/Sources/Scene2D/Internals/OpenGLFloatTextureProgram.cpp Fri Oct 28 10:56:34 2022 +0200 +++ b/OrthancStone/Sources/Scene2D/Internals/OpenGLFloatTextureProgram.cpp Fri Oct 28 13:20:36 2022 +0200 @@ -41,7 +41,7 @@ "void main() \n" "{ \n" " vec4 t = texture2D(u_texture, v_texcoord); \n" - " float v = (t.r * 256.0 + t.g) * 256.0; \n" + " float v = (t.r * 256.0 + t.g) * 255.0; \n" " v = v * u_slope + u_offset; \n" // (*) " float a = u_windowCenter - u_windowWidth / 2.0; \n" " float dy = 1.0 / u_windowWidth; \n"