3 ms·
does WebGL 2 have geometry shaders ?
by uegwqhugehoq 10y ago
does WebGL 2 have geometry shaders ?
- jsheard 10y agoNope, and it doesn't have compute or tessellation shaders either. Web 3D has a way to go before it catches up with native APIs.
- pjmlp 10y agoEvery time I see something done with it, versus what native code can do on the exact same hardware, I reach the conclusion it is only useful for DX 9 class graphics or just plain prototyping.
- goldfire 10y agoDX 9 class graphics are great for a lot of applications. Not every project has to be at the cutting edge of rendering technique to achieve its goals.
- pjmlp 10y agoWhich is a waste of resources already on a DX 10 level card, which were released alongside Windos 7, almost 10 years ago. When will we get a 3D Web API that can do DX11 class graphics? And I am already leaving out DX12, Vulkan level cards.
- sp332 10y agoJust curious, what's a practical application of geometry shaders?
- rudi-c 10y agoGeometry Shaders allows you to generate a variable number of vertices based on an input vertex. This is necessary in some cases where you generate models procedurally (e.g. particle animations, terrain generation). It's possible in theory to allocate a lot of vertices up front (up to the maximum that could be generated). If, for example, an input vertex can generate up to 15 vertices (as is the case of the marching cubes algorithm), you could just create those 15 vertices upfront and set the values of the one you don't need to something that will make it not render (e.g. degenerate triangle). But then your actual vertices become a lot more sparse and performance drops because of all the wasted work done on the throwaway vertices.