mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 21:21:10 -06:00
Cut: Fix model rendering
This commit is contained in:
parent
3ec927a841
commit
090a9247cb
8 changed files with 151 additions and 63 deletions
|
|
@ -35,6 +35,8 @@ uniform SlopeDetection slope;
|
|||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
// Color clip plane - general orientation. Used by the cut gizmo.
|
||||
uniform vec4 color_clip_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
|
@ -43,6 +45,7 @@ attribute vec3 v_normal;
|
|||
varying vec2 intensity;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
varying float color_clip_plane_dot;
|
||||
|
||||
varying vec4 world_pos;
|
||||
varying float world_normal_z;
|
||||
|
|
@ -74,4 +77,5 @@ void main()
|
|||
gl_Position = projection_matrix * position;
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
color_clip_plane_dot = dot(world_pos, color_clip_plane);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue