mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 23:48:44 +03:00
QIDISlicer1.0.0
This commit is contained in:
20
resources/shaders/ES/wireframe.vs
Normal file
20
resources/shaders/ES/wireframe.vs
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 100
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform float offset;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
attribute vec3 v_extra;
|
||||
|
||||
varying vec3 barycentric;
|
||||
|
||||
void main()
|
||||
{
|
||||
barycentric = v_extra;
|
||||
// Add small epsilon to z to solve z-fighting
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user