Fixed hovering not shown on out of print bed objects

This commit is contained in:
Enrico Turri 2018-04-12 13:54:26 +02:00
parent b062cddeea
commit a3fc49ee76

View File

@ -1828,7 +1828,6 @@ sub _fragment_shader_Gouraud {
return <<'FRAGMENT';
#version 110
const vec4 OUTSIDE_COLOR = vec4(0.24, 0.42, 0.62, 1.0);
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
// x = tainted, y = specular;
@ -1841,11 +1840,9 @@ uniform vec4 uniform_color;
void main()
{
// if the fragment is outside the print volume use predefined color
vec4 color = (any(lessThan(delta_box_min, ZERO)) || any(greaterThan(delta_box_max, ZERO))) ? OUTSIDE_COLOR : uniform_color;
gl_FragColor = vec4(intensity.y, intensity.y, intensity.y, 0.0) + color * intensity.x;
gl_FragColor.a = color.a;
// if the fragment is outside the print volume -> use darker color
vec3 color = (any(lessThan(delta_box_min, ZERO)) || any(greaterThan(delta_box_max, ZERO))) ? mix(uniform_color.rgb, ZERO, 0.3333) : uniform_color.rgb;
gl_FragColor = vec4(vec3(intensity.y, intensity.y, intensity.y) + color * intensity.x, uniform_color.a);
}
FRAGMENT