Evas 3D: Fix shadow map shader
authorOleksandr Shcherbina <o.shcherbina@samsung.com>
Mon, 30 Mar 2015 23:34:32 +0000 (08:34 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 30 Mar 2015 23:35:51 +0000 (08:35 +0900)
Summary:
Silly mistake after this b9b5ced501f4642f03d8bcc8441fd3f7b55a7f52 commit.
Seems uninitialized components of vector gl_FragColor

Reviewers: cedric, Hermet, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2258

src/modules/evas/engines/gl_common/shader_3d/evas_gl_3d_shaders.x
src/modules/evas/engines/gl_common/shader_3d/shadow_map_frag.shd

index eaf7ece..2987ff3 100644 (file)
@@ -1188,7 +1188,7 @@ static const char const shadow_map_frag_glsl[] =
    "#endif //DIFFUSE_TEXTURE\n"
    "#endif //DIFFUSE_TEXTURE_BLEND\n"
    "#endif //ALPHA_TEST_ENABLED\n"
-   "   gl_FragColor.r = gl_FragCoord.z;\n"
+   "   gl_FragColor = vec4(gl_FragCoord.z);\n"
    "}\n";
 
 static const char const color_pick_vert_glsl[] =
index 66a88ad..babc448 100644 (file)
@@ -36,5 +36,5 @@ void main() {
 
 #endif //ALPHA_TEST_ENABLED
 
-   gl_FragColor.r = gl_FragCoord.z;
+   gl_FragColor = vec4(gl_FragCoord.z);
 }