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;
-
-
-
oh wow, def giving this a shot tonight!
1 reply 0 retweets 1 like -
Andre Duvoisin Retweeted Andre Duvoisin
Worked super well! Super clever; took me a hot minute to figure out what exactly was happening, though.
https://twitter.com/andreduvoisin/status/1133116563400343557 …Andre Duvoisin added,
Andre Duvoisin @andreduvoisinWrote a quick fragment shader with @vigs072 last night to display a wireframe on a mesh! Wired the control through CEF and into our JavaScript UI layer afterwards.#compositeengine#gamedev#reactjs Inspired by the below tweet from@iquilezles. https://twitter.com/iquilezles/status/1132034905813049345 … pic.twitter.com/RndydJsiso1 reply 1 retweet 6 likes
Notably, the `<8` for 8x MSAA can be replaced with gl_NumSamples to accomodate other MSAA sample numbers.
2:11 PM - 27 May 2019
0 replies
0 retweets
2 likes
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.