mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-03 02:18:41 +03:00
update resources
This commit is contained in:
44
resources/shaders/110/mm_gouraud_wireframe.vs
Normal file
44
resources/shaders/110/mm_gouraud_wireframe.vs
Normal file
@@ -0,0 +1,44 @@
|
||||
#version 110
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
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.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_color;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
varying vec3 model_pos;
|
||||
varying vec4 world_pos;
|
||||
varying vec3 barycentric_coordinates;
|
||||
|
||||
struct SlopeDetection
|
||||
{
|
||||
bool actived;
|
||||
float normal_z;
|
||||
mat3 volume_world_normal_matrix;
|
||||
};
|
||||
uniform SlopeDetection slope;
|
||||
void main()
|
||||
{
|
||||
model_pos = v_position;
|
||||
//model_pos = vec4(v_position, 1.0);
|
||||
// Point in homogenous coordinates.
|
||||
world_pos = volume_world_matrix * vec4(model_pos, 1.0);
|
||||
|
||||
gl_Position = projection_matrix * view_model_matrix * vec4(v_position, 1.0);
|
||||
//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_color.xyz;
|
||||
}
|
||||
Reference in New Issue
Block a user