PrusaSlicer-NonPlainar/resources/shaders/options_120_solid.vs

15 lines
355 B
Plaintext
Raw Normal View History

2020-05-22 11:21:43 +00:00
#version 120
uniform float zoom;
uniform float point_size;
uniform float near_plane_height;
2020-05-22 11:21:43 +00:00
varying vec3 eye_center;
2020-05-22 11:21:43 +00:00
void main()
{
eye_center = (gl_ModelViewMatrix * gl_Vertex).xyz;
gl_Position = ftransform();
gl_PointSize = (gl_Position.w == 1.0) ? zoom * near_plane_height * point_size : near_plane_height * point_size / gl_Position.w;
2020-05-22 11:21:43 +00:00
}