From 52e2f4606f1df7ff84187b8fbc0977ac4e97599d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 24 Apr 2015 23:46:42 -0300 Subject: [PATCH] -Objects with BlendMode!=MIX do not get affected by CanvasModulate, fixes #1724 --- demos/2d/isometric_light/torch.scn | Bin 4262 -> 4416 bytes demos/2d/isometric_light/torch_shader.res | Bin 741 -> 746 bytes drivers/gles2/rasterizer_gles2.cpp | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/2d/isometric_light/torch.scn b/demos/2d/isometric_light/torch.scn index d1cb7fe7e6396a66cbf129c12e31360f09f6e6fe..3f08b33311764e611c28e0d1f5adf21c77772f5c 100644 GIT binary patch delta 2596 zcmW+&eQ+Dq5#PI$eYWHvCr%>l#Q4dIBqzp^gH25m67NZN94B@Y>=?%lL3ff)(qUOA zbdnvLfD}pyNuUf|+YGcbh`N-SQt&XHmXEYViRnzsM=AY-Qc9Vdgz(jAI}~Q<5GY;g zW`4hWZ+GAB``EX4KXaGc2gb%jA*ei!09U&KM(Y3^gx`~h11NI9v04-mpn=)!`<3Xl z8XJ$QX_c+8uBTCKr+nz4;0w}P=3sxQ+ZG7q^lUU4mOmCYXVMAF=7rT3cx`bds)i)N zs`FUfu-!;1F?}u^N$C-*&I?YG@#Z#;36J1}d6?VD{mc9@w}opo|HzH<(z|9We}Ox0 zTKpb9w#B?w_*3D$?`1xlm{%^clb|ZExVvo$HIP(sSMjvmC@h3$w9=2tPEI+ZM2b#6 zrOf*p(X;DT%hqJs{O$>uVXNF1g0Vr3*XIJ|Cxcr{tAt2C9%uV`Lt8lh@6uXMHP{Y& zK9$olDNW77N_S(a+2Rfcp9RHRn2}FjhFRDzKOPx_46{ST@2Lx9vU*fCjIjI_tY>>I zXcl5>Tw!tFlub>?!a2_w^&KIr>$&zr?YD%27y~1I*gYoCSkTWY(a0oTvY?4KGOGKu z^q$2{oahmhd`?H7{367CPs?80ekGgJJcZwZ;eP#6ZG92tU*mn=H^jJ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wkHX+G z4lUy_EzR8zyNWLuA@sp+Qalc$#5cl?w8t3H__F3E(!2(Hh#!OrLOWd@rb^?uD?G6CpzKD3L}KV`6YW#7XIgDdHy} zK`6r=gkvzhjLBu3p*d$DMf@b_MJyg`npL6@+_v-;rK(qYR?1<8bRH=@I?|rtYIWjW_25p_S#G;8g%FHZf_eAJ3^plx+tSFLQaRTdY;RK$s#S<`3 zwH1N|CWid5NVp9SGO=HTyU5xaIJ9i@Zo&`Y`-JmQ+@*$$O;foXW{$yXd|`kpkR;=N zvOl&=A_k}m&V=sAL9CaEx5XD6d7w^6Zov^&Y}a(BpoHqLlnHeaJ(V(mk*@gcnb;F5 H{`LJI_(0VJ diff --git a/demos/2d/isometric_light/torch_shader.res b/demos/2d/isometric_light/torch_shader.res index ad70d5260de0b0e7ee2c5f8a56d8a8f1f12e81ea..31a35de1da6c391e975bad8e34d02bf2c9314f3b 100644 GIT binary patch delta 171 zcmaFL`ifOGDA?JV0R#jX7=l?C7%nj}FfcMOG%zwSDzG^)J1{T^E3iyd_7@RRuy5c> z5M;^BOOMZWux1c{z#u-cMU}B>;woih4+m=n28Y-NBi54qqU4PDhDHWG1tBJe=gbQ7 z3JeT_3d|1~jTwRywj@+JI59{m$TurwF5JQgu-p7e?Y5P6j&UD9T=Q8 TI7mC{JeF~04hjx(2DuObT%;&d delta 166 zcmaFG`jk~UDA?JV0R#jX82nin7|t>=FfcMOG%zwSHn1fyFbFHKPE_?55>T*j;9}A* z%}d~5N?{Oxz#u%aLzS^^;yPs$7YAzv28Y-NBi54qqU4PDgc8OgJp~~qhR4hb@(K(L zf(pzJ8TA>06E-ANIXE#$Dabhd+|0tbpHcOkQ?&y#gM`9ur+*F%3@i#P2e_R!I7mC{ PJeF~04hjx(200D@ziube diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 0598d9222c1..759d20aab15 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -9376,7 +9376,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const _canvas_item_setup_shader_uniforms(material,shader_cache); } - bool unshaded = material && material->shading_mode==VS::CANVAS_ITEM_SHADING_UNSHADED; + bool unshaded = (material && material->shading_mode==VS::CANVAS_ITEM_SHADING_UNSHADED) || ci->blend_mode!=VS::MATERIAL_BLEND_MODE_MIX; if (unshaded) { canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE,Color(1,1,1,1));