SLA gizmo clipping plane logic moved to fragment shader

This means the clipping now works again with both legacy and modern OpenGL
This commit is contained in:
Lukas Matena 2019-03-25 12:01:02 +01:00
parent 273fcf68a1
commit 9b7857aaab
7 changed files with 41 additions and 38 deletions

View file

@ -34,7 +34,7 @@ varying vec2 intensity;
varying vec3 delta_box_min;
varying vec3 delta_box_max;
varying float world_z;
varying vec3 world_pos;
void main()
{
@ -69,5 +69,5 @@ void main()
}
gl_Position = ftransform();
world_z = vec3(print_box.volume_world_matrix * gl_Vertex).z;
world_pos = vec3(print_box.volume_world_matrix * gl_Vertex);
}