Quick & Dirty trick to render a debug wireframe for your poly meshes, assuming you are rendering with 8X MSAA (which you are, aren't you, AREN'T YOU!!): In your fragment shader, at the end of the fragment shader, add color = (bitCount(gl_SampleMaskIn[0])<8) ? vec3(0.0) : color;
-
-
Replying to @iquilezles
Wtf - how does this work?! Also, a shame they named it msaa! That hardware would be so much better if they named it something different so people could understand how that works. ; )
1 reply 0 retweets 3 likes -
Replying to @Alleycatsphinx @iquilezles
As far as I understand: `bitCount(gl_SampleMaskIn[0])` gives you the number of samples that were taken within the polygon. On the edge of the polygon, that number is less than the sample count (8 in this case), as some of the samples are taken (1/2)
1 reply 0 retweets 1 like
outside of the polygon (hence antialiasing). On the interior of the polygon, that number is equal to the sample count, since all of the samples are taken within the polygon boundary. (2/2)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.