Re:Instanced Line Rendering Part II: Alpha Blending
by pcwalton on Friday October 08, 2021 @04:12AM
(#28796855)
You could try using the Z buffer instead of the stencil buffer. Give each object a different Z coordinate and use GL_LESS/GL_GREATER depth tests to avoid overdrawing.
[ Parent
| on HN ]
Re:Instanced Line Rendering Part II: Alpha Blending
by thomasikzelf on Friday October 08, 2021 @12:52PM
(#28801309)
I tried this but it rules out doing antialiasing in the fragment shader.
Re:Instanced Line Rendering Part II: Alpha Blending
by pcwalton on Friday October 08, 2021 @02:59PM
(#28802807)
It shouldn't if you submit the paths from back to front and enable blending. You can then use analytic AA (distance-based or whatever you'd like) to blend with paths behind the one you're currently drawing.