mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
fix old xray view
I don't understand why it only seems to work if I define u_color via [default] andd why it doesn't work when I set it inside the shader itself.
This commit is contained in:
parent
0e633a0dfa
commit
b51b699715
3 changed files with 16 additions and 10 deletions
|
@ -50,8 +50,9 @@ fragment =
|
|||
|
||||
result = layer0 * layer0.a + result * (1.0 - layer0.a);
|
||||
|
||||
float intersection_count = texture2D(u_layer2, v_uvs).r * 255.0;
|
||||
if(mod(intersection_count, 2.0) >= 1.0)
|
||||
float intersection_count = texture2D(u_layer2, v_uvs).r * 50; // 1 / .02
|
||||
float rest = mod(intersection_count, 2.0);
|
||||
if (rest > 0.5 && rest < 1.5)
|
||||
{
|
||||
result = u_error_color;
|
||||
}
|
||||
|
@ -121,8 +122,9 @@ fragment41core =
|
|||
|
||||
result = layer0 * layer0.a + result * (1.0 - layer0.a);
|
||||
|
||||
float intersection_count = texture(u_layer2, v_uvs).r * 255.0;
|
||||
if(mod(intersection_count, 2.0) >= 1.0)
|
||||
float intersection_count = texture(u_layer2, v_uvs).r * 50; // 1 / .02
|
||||
float rest = mod(intersection_count, 2.0);
|
||||
if (rest > 0.5 && rest < 1.5)
|
||||
{
|
||||
result = u_error_color;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue