1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0027123: Visualization, TKOpenGl - fix environment texture GLSL program

OpenGl_ShaderManager::prepareStdProgramFlat() - properly initialize vec4.
This commit is contained in:
kgv 2016-01-30 18:24:12 +03:00 committed by bugmaster
parent e2ca538ae6
commit b872ca56de

View File

@ -1233,7 +1233,7 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramFlat (Handle(OpenGl_Shad
EOL" vec3 aNormal = transformNormal (occNormal);"
EOL" vec3 aReflect = reflect (normalize (aPosition.xyz), aNormal);"
EOL" aReflect.z += 1.0;"
EOL" TexCoord = aReflect.xy * inversesqrt (dot (aReflect, aReflect)) * 0.5 + vec2 (0.5);";
EOL" TexCoord = vec4(aReflect.xy * inversesqrt (dot (aReflect, aReflect)) * 0.5 + vec2 (0.5), 0.0, 1.0);";
aSrcFragGetColor =
EOL"vec4 getColor(void) { return occTexture2D (occActiveSampler, TexCoord.st); }";