2023-10-27 02:51:15 +00:00
|
|
|
#version 140
|
2023-10-25 15:14:53 +00:00
|
|
|
|
|
|
|
const float EPSILON = 0.0001;
|
|
|
|
|
|
|
|
uniform vec4 uniform_color;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_FragColor = uniform_color;
|
|
|
|
// Values inside depth buffer for fragments of the contour of a selected area are offset
|
|
|
|
// by small epsilon to solve z-fighting between painted triangles and contour lines.
|
|
|
|
gl_FragDepth = gl_FragCoord.z - EPSILON;
|
|
|
|
}
|