mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 14:55:08 -06:00
NEW: add the wireframe rendering mode for debug
currently we can turn on/off it by 'ctrl+shift+enter' Change-Id: Ic9e5460e8955376e8e2c1a3701e12a1f0b4216ad
This commit is contained in:
parent
c423577e1d
commit
b4d66394e7
6 changed files with 62 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
#version 110
|
||||
#version 130
|
||||
|
||||
#define INTENSITY_CORRECTION 0.6
|
||||
|
||||
|
@ -43,6 +43,8 @@ varying vec4 world_pos;
|
|||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
varying vec3 barycentric_coordinates;
|
||||
|
||||
void main()
|
||||
{
|
||||
// First transform the normal into camera space and normalize the result.
|
||||
|
@ -70,4 +72,8 @@ void main()
|
|||
gl_Position = ftransform();
|
||||
// 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);
|
||||
|
||||
//compute the Barycentric Coordinates
|
||||
int vertexMod3 = gl_VertexID % 3;
|
||||
barycentric_coordinates = vec3(float(vertexMod3 == 0), float(vertexMod3 == 1), float(vertexMod3 == 2));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue