Mercurial > hg > orthanc-stone
changeset 1969:ee68ee732aa7
fix OpenGL shader for floating-point textures
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 28 Oct 2022 13:20:36 +0200 |
parents | ed5a0b9183dc |
children | 33d2ff1aeaae |
files | OrthancStone/Sources/Scene2D/Internals/OpenGLFloatTextureProgram.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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"