The question:
Are there any provisions within Three.js to allow or support quad rendering, that is: shaders which accept four vertices and four normals as input?
The reason why I’m asking:
Three.js comes with a host of functions for the procedural generation of geometries, like
- ConeGeometry,
- CylinderGeometry,
- ExtrudeGeometry,
- LatheGeometry,
- PlaneGeometry,
- RingGeometry,
- SphereGeometry,
- TorusGeometry,
- TubeGeometry,
all of which have in common that they generate strips (or “bands”) of quads, which are split into triangles each and are then passed to the shaders as triangles.
In my view it is a pity to discard the high-level quality information contained in quads in favour of literally primitive triangles, because that way we incur both performance and rendering quality degradation at the same time:
- Using triangles results in 2.0 times the number of faces and 1.5 times the number of vertices compared to quads.
- Rendering a quad as two triangles results in a very obvious loss of mapping fidelity associated with affine texturing, as I’ve elaborated here. This loss of mapping fidelity can only partially be overcome by cranking up the number of i.e. lathing segments, which would hurt performance even more.
OTOH, the results of bilinear normals interpolation in quads in the context of reflection mapping appear most promising, to avoid the above downsides.