Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sweet visualizations!

Have you measured the performance of this form of tessellation vs. using GL_INVERT on the stencil buffer to implement the even-odd fill rule? I've always been curious about the relative performance of the two approaches when you have to tessellate at runtime.



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.


> 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/open...


Ah, 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: