Convert points into circles in 3d model

Anyone know how to convert points into circles of a 3d model?

Yes. The most straightforward way is to add a few lines in the fragment shader (written from my memory and untested right now, but I hope you get the idea):

if (length(gl_PointCoord.xy-vec2(0.5)) > 0.5) {

Live example:

It uses the same approach like the official example:

Here is the verified code:

if ( length( gl_PointCoord - vec2( 0.5, 0.5 ) ) > 0.475 ) discard;
1 Like