comparison Framework/Scene2D/Internals/OpenGLFloatTextureProgram.cpp @ 770:e6850c866469

fix windowing
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 24 May 2019 11:02:20 +0200
parents e3f21a265be5
children ed783cbc92d7
comparison
equal deleted inserted replaced
769:4ba8892870a2 770:e6850c866469
39 "{ \n" 39 "{ \n"
40 " vec4 t = texture2D(u_texture, v_texcoord); \n" 40 " vec4 t = texture2D(u_texture, v_texcoord); \n"
41 " float v = (t.r * 256.0 + t.g) * 256.0; \n" 41 " float v = (t.r * 256.0 + t.g) * 256.0; \n"
42 " v = v * u_slope + u_offset; \n" // (*) 42 " v = v * u_slope + u_offset; \n" // (*)
43 " float a = u_windowCenter - u_windowWidth; \n" 43 " float a = u_windowCenter - u_windowWidth; \n"
44 " float dy = 1.0 / (2.0 * u_windowWidth); \n" 44 " float dy = 1.0 / u_windowWidth; \n"
45 " if (v <= a) \n" 45 " if (v <= a) \n"
46 " v = 0.0; \n" 46 " v = 0.0; \n"
47 " else \n" 47 " else \n"
48 " { \n" 48 " { \n"
49 " v = (v - a) * dy; \n" 49 " v = (v - a) * dy; \n"