Merge remote-tracking branch 'origin/master' into ys_search
This commit is contained in:
commit
5f31d9ed41
31 changed files with 680 additions and 543 deletions
|
@ -8,7 +8,7 @@ const float EPSILON = 0.0001;
|
|||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool active;
|
||||
bool actived;
|
||||
// x = yellow, y = red
|
||||
vec2 z_range;
|
||||
mat3 volume_world_normal_matrix;
|
||||
|
@ -37,7 +37,7 @@ void main()
|
|||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
vec3 color = slope.active ? slope_color() : uniform_color.rgb;
|
||||
vec3 color = slope.actived ? slope_color() : uniform_color.rgb;
|
||||
// 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;
|
||||
gl_FragColor = vec4(vec3(intensity.y, intensity.y, intensity.y) + color * intensity.x, uniform_color.a);
|
||||
|
|
|
@ -20,7 +20,7 @@ const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
|||
|
||||
struct PrintBoxDetection
|
||||
{
|
||||
bool active;
|
||||
bool actived;
|
||||
vec3 min;
|
||||
vec3 max;
|
||||
mat4 volume_world_matrix;
|
||||
|
@ -28,7 +28,7 @@ struct PrintBoxDetection
|
|||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool active;
|
||||
bool actived;
|
||||
// x = yellow, y = red
|
||||
vec2 z_range;
|
||||
mat3 volume_world_normal_matrix;
|
||||
|
@ -72,7 +72,7 @@ void main()
|
|||
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
|
||||
|
||||
// compute deltas for out of print volume detection (world coordinates)
|
||||
if (print_box.active)
|
||||
if (print_box.actived)
|
||||
{
|
||||
vec3 v = (print_box.volume_world_matrix * gl_Vertex).xyz;
|
||||
delta_box_min = v - print_box.min;
|
||||
|
@ -85,7 +85,7 @@ void main()
|
|||
}
|
||||
|
||||
// z component of normal vector in world coordinate used for slope shading
|
||||
world_normal_z = slope.active ? (normalize(slope.volume_world_normal_matrix * gl_Normal)).z : 0.0;
|
||||
world_normal_z = slope.actived ? (normalize(slope.volume_world_normal_matrix * gl_Normal)).z : 0.0;
|
||||
|
||||
gl_Position = ftransform();
|
||||
// Point in homogenous coordinates.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue