mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 20:58:58 +08:00
Fix striped (off-buildplate) shader for ortho-view.
part of CURA-6583
This commit is contained in:
parent
a4093aa6fd
commit
a61e7ea7df
@ -45,7 +45,7 @@ fragment =
|
||||
mediump vec4 finalColor = vec4(0.0);
|
||||
mediump vec4 diffuseColor = u_vertical_stripes ?
|
||||
(((mod(v_vertex.x, u_width) < (u_width / 2.)) ^^ (mod(v_vertex.z, u_width) < (u_width / 2.))) ? u_diffuseColor1 : u_diffuseColor2) :
|
||||
((mod((-v_position.x + v_position.y), u_width) < (u_width / 2.)) ? u_diffuseColor1 : u_diffuseColor2);
|
||||
((mod((-v_vertex.x + v_vertex.y + v_vertex.z), u_width) < (u_width / 2.)) ? u_diffuseColor1 : u_diffuseColor2);
|
||||
|
||||
/* Ambient Component */
|
||||
finalColor += u_ambientColor;
|
||||
@ -118,7 +118,7 @@ fragment41core =
|
||||
mediump vec4 finalColor = vec4(0.0);
|
||||
mediump vec4 diffuseColor = u_vertical_stripes ?
|
||||
(((mod(v_vertex.x, u_width) < (u_width / 2.)) ^^ (mod(v_vertex.z, u_width) < (u_width / 2.))) ? u_diffuseColor1 : u_diffuseColor2) :
|
||||
((mod((-v_position.x + v_position.y), u_width) < (u_width / 2.)) ? u_diffuseColor1 : u_diffuseColor2);
|
||||
((mod((-v_vertex.x + v_vertex.y + v_vertex.z), u_width) < (u_width / 2.)) ? u_diffuseColor1 : u_diffuseColor2);
|
||||
|
||||
/* Ambient Component */
|
||||
finalColor += u_ambientColor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user