mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:19:00 +08:00
make xray error noise depend on background color
This commit is contained in:
parent
4a8385e3e8
commit
1b2cc7f7a7
@ -61,7 +61,8 @@ fragment =
|
||||
float intersection_count = texture2D(u_layer2, v_uvs).r * 255.0;
|
||||
if(mod(intersection_count, 2.0) >= 1.0)
|
||||
{
|
||||
if (hash12(v_uvs) > 0.5)
|
||||
float lightness = (result.r + result.g + result.b) / 3.0;
|
||||
if (hash12(v_uvs) < lightness)
|
||||
{
|
||||
result = result * (1.0 - u_xray_error_strength) + u_xray_error_strength * u_error_color;
|
||||
}
|
||||
@ -149,7 +150,8 @@ fragment41core =
|
||||
float intersection_count = texture(u_layer2, v_uvs).r * 255.0;
|
||||
if(mod(intersection_count, 2.0) >= 1.0)
|
||||
{
|
||||
if (hash12(v_uvs) > 0.5)
|
||||
float lightness = (result.r + result.g + result.b) / 3.0;
|
||||
if (hash12(v_uvs) < lightness)
|
||||
{
|
||||
result = result * (1.0 - u_xray_error_strength) + u_xray_error_strength * u_error_color;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user