2021-08-10 19:38:48 +00:00
|
|
|
#version 110
|
|
|
|
|
2022-04-07 10:59:11 +00:00
|
|
|
uniform float offset;
|
|
|
|
|
2021-08-10 19:38:48 +00:00
|
|
|
void main()
|
|
|
|
{
|
2022-04-07 08:40:33 +00:00
|
|
|
// Add small epsilon to z to solve z-fighting between painted triangles and contour lines.
|
|
|
|
vec4 clip_position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
2022-04-07 10:59:11 +00:00
|
|
|
clip_position.z -= offset * abs(clip_position.w);
|
2022-04-07 08:40:33 +00:00
|
|
|
gl_Position = clip_position;
|
2021-08-10 19:38:48 +00:00
|
|
|
}
|