2 ms·
I haven't benchmarked but I suspect the stencil buffer would be better. But the time is so small that for static meshes (as in this demo) it is negligible. Unf
by mattdesl 11y ago
I haven't benchmarked but I suspect the stencil buffer would be better. But the time is so small that for static meshes (as in this demo) it is negligible.
Unfortunately you lose MSAA with the stencil buffer approach.
- exDM69 11y ago> Unfortunately you lose MSAA with the stencil buffer approach. I don't think that's the case. Depth and stencil buffers are multisampled too. This makes e.g. stencil shadow volumes look really good on new hardware. The edges are sharp but there's no pixelation artifacts. Additionally, there's a new GL extension in Nvidia Maxwell GM204, which allows using more stencil samples to get prettier filled paths or shadow volumes: https://developer.nvidia.com/sites/default/files/akamai/opengl/specs/GL_NV_framebuffer_mixed_samples.txt https://developer.nvidia.com/sites/default/files/akamai/open...
- mattdesl 11y agoAh, I was referring to WebGL specifically. From what I've seen, you lose AA with stencil polygon approach. https://github.com/pixijs/pixi.js/issues/1011 https://github.com/pixijs/pixi.js/issues/1011