mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 04:43:15 +08:00
Shader: Use builtin rather than mix ourselves.
part of CURA-7262
This commit is contained in:
parent
a7acee1123
commit
e23b9a94fa
@ -56,7 +56,7 @@ fragment =
|
|||||||
float rest = mod(intersection_count + .01, 2.0);
|
float rest = mod(intersection_count + .01, 2.0);
|
||||||
if (rest > 1.0 && rest < 1.5 && intersection_count < 49.0)
|
if (rest > 1.0 && rest < 1.5 && intersection_count < 49.0)
|
||||||
{
|
{
|
||||||
result = result * (1.0 - u_xray_error_strength) + u_xray_error_strength * texture2D(u_xray_error, v_uvs * u_xray_error_scale);
|
result = mix(result, texture2D(u_xray_error, v_uvs * u_xray_error_scale), u_xray_error_strength);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 sum = vec4(0.0);
|
vec4 sum = vec4(0.0);
|
||||||
@ -132,7 +132,7 @@ fragment41core =
|
|||||||
float rest = mod(intersection_count + .01, 2.0);
|
float rest = mod(intersection_count + .01, 2.0);
|
||||||
if (rest > 1.0 && rest < 1.5 && intersection_count < 49)
|
if (rest > 1.0 && rest < 1.5 && intersection_count < 49)
|
||||||
{
|
{
|
||||||
result = result * (1.0 - u_xray_error_strength) + u_xray_error_strength * texture(u_xray_error, v_uvs * u_xray_error_scale);
|
result = mix(result, texture(u_xray_error, v_uvs * u_xray_error_scale), u_xray_error_strength);
|
||||||
}
|
}
|
||||||
|
|
||||||
vec4 sum = vec4(0.0);
|
vec4 sum = vec4(0.0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user