mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 13:12:38 -06:00
Various fixes
This commit is contained in:
parent
a50c5a2b7a
commit
fe78e40cb4
26 changed files with 176 additions and 58 deletions
|
|
@ -2,10 +2,14 @@
|
|||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform float offset;
|
||||
|
||||
in vec3 v_position;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
// Add small epsilon to z to solve z-fighting between painted triangles and contour lines.
|
||||
vec4 clip_position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
clip_position.z -= offset * abs(clip_position.w);
|
||||
gl_Position = clip_position;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue