FDM supports gizmo 'autoset by angle' improvements:

- Extra dialog for autosetting by angle in FDM supports gizmo was removed
- Highlighting facets by angle is now controlled by a slider in the main gizmo dialog
- User is allowed to paint even when using the slope highlighter
- The button to turn highlighted facets to blockers was removed, it made no sense
- Highlighted facets are now rendered in light blue
This commit is contained in:
Lukas Matena 2021-01-14 13:00:54 +01:00
parent 672ed99320
commit cd1322ce3f
6 changed files with 212 additions and 188 deletions

View file

@ -32,22 +32,22 @@ varying vec3 delta_box_max;
varying float world_normal_z;
varying vec3 eye_normal;
vec3 slope_color()
{
return (world_normal_z > slope.normal_z - EPSILON) ? GREEN : RED;
}
void main()
{
if (any(lessThan(clipping_planes_dots, ZERO)))
discard;
vec3 color = slope.actived ? slope_color() : uniform_color.rgb;
vec3 color = uniform_color.rgb;
float alpha = uniform_color.a;
if (slope.actived && world_normal_z < slope.normal_z - EPSILON) {
color = vec3(0.7f, 0.7f, 1.f);
alpha = 1.f;
}
// if the fragment is outside the print volume -> use darker color
color = (any(lessThan(delta_box_min, ZERO)) || any(greaterThan(delta_box_max, ZERO))) ? mix(color, ZERO, 0.3333) : color;
#ifdef ENABLE_ENVIRONMENT_MAP
if (use_environment_tex)
gl_FragColor = vec4(0.45 * texture2D(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color * intensity.x, uniform_color.a);
gl_FragColor = vec4(0.45 * texture2D(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color * intensity.x, alpha);
else
#endif
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, uniform_color.a);
gl_FragColor = vec4(vec3(intensity.y) + color * intensity.x, alpha);
}