瀏覽代碼

Merge pull request #25779 from JFonS/fix_25581

Make LIGHT_VEC affect 2D shadows again
Rémi Verschelde 6 年之前
父節點
當前提交
48bc7aedaa
共有 2 個文件被更改,包括 0 次插入2 次删除
  1. 0 1
      drivers/gles2/shaders/canvas.glsl
  2. 0 1
      drivers/gles3/shaders/canvas.glsl

+ 0 - 1
drivers/gles2/shaders/canvas.glsl

@@ -414,7 +414,6 @@ FRAGMENT_SHADER_CODE
 		color *= light;
 
 #ifdef USE_SHADOWS
-		light_vec = light_uv_interp.zw; //for shadows
 		float angle_to_light = -atan(light_vec.x, light_vec.y);
 		float PI = 3.14159265358979323846264;
 		/*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays

+ 0 - 1
drivers/gles3/shaders/canvas.glsl

@@ -549,7 +549,6 @@ FRAGMENT_SHADER_CODE
 		color *= light;
 
 #ifdef USE_SHADOWS
-		light_vec = light_uv_interp.zw; //for shadows
 		float angle_to_light = -atan(light_vec.x, light_vec.y);
 		float PI = 3.14159265358979323846264;
 		/*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays