mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
prevent false negative xray error for high overlap count
This commit is contained in:
parent
5d90fd31d9
commit
890b6dc0b4
2 changed files with 4 additions and 4 deletions
|
@ -53,7 +53,7 @@ fragment =
|
|||
|
||||
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)
|
||||
if (rest > 1.0 && rest < 1.5 && intersection_count < 49)
|
||||
{
|
||||
vec2 scaling = textureSize(u_layer0, 0) / textureSize(u_xray_error, 0);
|
||||
result = result * (1.0 - u_xray_error_strength) + u_xray_error_strength * texture(u_xray_error, v_uvs * scaling);
|
||||
|
@ -129,7 +129,7 @@ fragment41core =
|
|||
|
||||
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)
|
||||
if (rest > 1.0 && rest < 1.5 && intersection_count < 49)
|
||||
{
|
||||
vec2 scaling = textureSize(u_layer0, 0) / textureSize(u_xray_error, 0);
|
||||
result = result * (1.0 - u_xray_error_strength) + u_xray_error_strength * texture(u_xray_error, v_uvs * scaling);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue