mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-03 20:13:59 -06:00
FIX:Replace v_barycentric by gl_Color to slove factory computer issues
modify Shortcut keys to toggle Wireframe Jira: STUDIO-4772 Change-Id: Ica5c1c6c0a41ed247c85173b3b0437632f596e7d (cherry picked from commit 79a1805e8fde6e0b735a529ab7c7c7fe9015865b)
This commit is contained in:
parent
8a8020e0a9
commit
17e9bb48d8
5 changed files with 22 additions and 24 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_barycentric;
|
||||
//attribute vec3 v_position;
|
||||
//attribute vec3 v_barycentric;
|
||||
|
||||
uniform mat4 volume_world_matrix;
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
|
@ -25,19 +25,18 @@ struct SlopeDetection
|
|||
uniform SlopeDetection slope;
|
||||
void main()
|
||||
{
|
||||
//model_pos = gl_Vertex;
|
||||
model_pos = vec4(v_position, 1.0);
|
||||
model_pos = gl_Vertex;
|
||||
//model_pos = vec4(v_position, 1.0);
|
||||
// Point in homogenous coordinates.
|
||||
//vec4 world_pos = volume_world_matrix * gl_Vertex;
|
||||
world_pos = volume_world_matrix * model_pos;
|
||||
|
||||
//gl_Position = ftransform();
|
||||
gl_Position = gl_ModelViewProjectionMatrix * vec4(v_position.x, v_position.y, v_position.z, 1.0);
|
||||
gl_Position = ftransform();
|
||||
//gl_Position = gl_ModelViewProjectionMatrix * vec4(v_position, 1.0);
|
||||
// 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));
|
||||
barycentric_coordinates = v_barycentric;
|
||||
barycentric_coordinates = gl_Color.xyz;//v_barycentric
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue