3 ms·
"The gpu will deal with the quads itself, possibly by creating two triangles for each quad. This is very unlikely to be a performance hit since it does not affe
by DominikD 11y ago
"The gpu will deal with the quads itself, possibly by creating two triangles for each quad. This is very unlikely to be a performance hit since it does not affect shading."
No modern GPU (or API in fact) deals with quads. You can't guarantee all vertices to be coplanar when dealing with floating point values so you're much better off pushing triangles and not forcing driver to do conversion for you. Also if vertex data bandwidth is scarce in particle-heavy scene (so you actually care if it's 3 of 6 or whatever vertices), just push one vertex and expand it in GS like everyone else does.
- CyberDildonics 11y agoI would love to see a case, even contrived, where planar quads produce artifacts from floating point precision but I think it would be extremely difficult to demonstrate it even on an enormous ground plane quad, let alone a subpixel quad. I'm not sure why you would say no modern API deals with quads, what would you call the ability to draw quads and quad strips from gpu buffers in OpenGL? Geometry shaders should work well, what I described is an approach for lower tech situations.
- DominikD 11y agoPretty much any set of 4 fp vectors that don't share z coord will end up non-coplanar at some point (if you insist on going barycentric for texture iteration or if you plan on using halfplanes to do intersection or whatever). That's why HW tends to use fixed point internal representation in such places. But yeah, whatever, it's almost 1am and I shouldn't be spending time convincing people online that GPU developers know a thing or two about GPU. :) But at the very least trust me on one thing: quads are dead. They've been dead for a long, long time now, low-end or high-end, quads make no sense at all.