summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDmytro Dadyka <d.dadyka@dmail.com>2015-01-07 12:00:47 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-01-07 12:00:47 +0900
commite7752ff7d7ccff21b8b162eb53620b63f6d34688 (patch)
treee22a5558cebc5d617c9c898fd74d921249114966 /src/modules
parent5e3cad840e6aa2c3d7c44514fd0405031e7c1f99 (diff)
[Evas: Evas_3D]Fixed bug with shadows and blending of vertex position
Reviewers: cedric, Hermet Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1850
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_3d.c2
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_3d_shader.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_3d.c b/src/modules/evas/engines/gl_common/evas_gl_3d.c
index ac17007c17..4f045d29e7 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_3d.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_3d.c
@@ -1242,7 +1242,7 @@ void _shadowmap_render(E3D_Drawable *drawable, E3D_Renderer *renderer, Evas_3D_S
1242 Evas_Mat4 matrix_vp; 1242 Evas_Mat4 matrix_vp;
1243 1243
1244 glEnable(GL_POLYGON_OFFSET_FILL); 1244 glEnable(GL_POLYGON_OFFSET_FILL);
1245 glPolygonOffset(4.0, 10000.0); 1245 glPolygonOffset(4.0, 100.0);
1246 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, drawable->texDepth, 0); 1246 glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, drawable->texDepth, 0);
1247 e3d_renderer_target_set(renderer, drawable); 1247 e3d_renderer_target_set(renderer, drawable);
1248 e3d_renderer_clear(renderer, &c); 1248 e3d_renderer_clear(renderer, &c);
diff --git a/src/modules/evas/engines/gl_common/evas_gl_3d_shader.c b/src/modules/evas/engines/gl_common/evas_gl_3d_shader.c
index 80401a6dc3..c036aa1840 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_3d_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_3d_shader.c
@@ -501,7 +501,7 @@ _vertex_shader_string_get(E3D_Shader_String *shader,
501 501
502 if (flags & E3D_SHADER_FLAG_SHADOWED) 502 if (flags & E3D_SHADER_FLAG_SHADOWED)
503 { 503 {
504 ADD_LINE("lpos = uMatrixLight * vec4(aPosition0.xyz, 1.0);"); 504 ADD_LINE("lpos = uMatrixLight * position;");
505 } 505 }
506 506
507 ADD_LINE("}"); 507 ADD_LINE("}");
@@ -1143,7 +1143,7 @@ _fragment_shader_string_get(E3D_Shader_String *shader,
1143 ADD_LINE("fragmentNormalMap();"); 1143 ADD_LINE("fragmentNormalMap();");
1144 } 1144 }
1145 1145
1146 if (flags & E3D_SHADER_FLAG_FOG_ENABLED) 1146 if ((flags & E3D_SHADER_FLAG_FOG_ENABLED) && (mode != EVAS_3D_SHADE_MODE_SHADOW_MAP_RENDER))
1147 { 1147 {
1148 ADD_LINE("float z = gl_FragCoord.z / gl_FragCoord.w;"); 1148 ADD_LINE("float z = gl_FragCoord.z / gl_FragCoord.w;");
1149 ADD_LINE("float fogFactor = exp2( -uFogFactor * uFogFactor * z * z * 1.44 );"); 1149 ADD_LINE("float fogFactor = exp2( -uFogFactor * uFogFactor * z * z * 1.44 );");