This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/modes/shaders/paint_vert_frag.glsl

18 lines
305 B
GLSL
Raw Normal View History

2017-05-06 01:34:16 +02:00
flat in vec4 finalColor;
2017-05-06 01:34:16 +02:00
out vec4 fragColor;
void main()
{
vec2 centered = gl_PointCoord - vec2(0.5);
float dist_squared = dot(centered, centered);
const float rad_squared = 0.25;
2017-05-06 01:34:16 +02:00
// round point with jaggy edges
if (dist_squared > rad_squared) {
discard;
}
2017-05-06 01:34:16 +02:00
fragColor = finalColor;
2017-05-06 01:34:16 +02:00
}