mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
fix xray for high intersection count models
I don't understand why, but any deviation from this produces worse results
This commit is contained in:
parent
b51b699715
commit
5d90fd31d9
2 changed files with 12 additions and 12 deletions
|
@ -50,9 +50,9 @@ fragment =
|
|||
|
||||
result = layer0 * layer0.a + result * (1.0 - layer0.a);
|
||||
|
||||
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)
|
||||
float intersection_count = texture2D(u_layer2, v_uvs).r * 51; // (1 / .02) + 1 (+1 magically fixes issues with high intersection count models)
|
||||
float rest = mod(intersection_count + .01, 2.0);
|
||||
if (rest > 1.0 && rest < 1.5)
|
||||
{
|
||||
result = u_error_color;
|
||||
}
|
||||
|
@ -122,9 +122,9 @@ fragment41core =
|
|||
|
||||
result = layer0 * layer0.a + result * (1.0 - layer0.a);
|
||||
|
||||
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)
|
||||
float intersection_count = texture(u_layer2, v_uvs).r * 51; // (1 / .02) + 1 (+1 magically fixes issues with high intersection count models)
|
||||
float rest = mod(intersection_count + .01, 2.0);
|
||||
if (rest > 1.0 && rest < 1.5)
|
||||
{
|
||||
result = u_error_color;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue