Defines which side of faces will be rendered - front, back or both. Default is THREE.FrontSide. Other options are THREE.BackSide or THREE.DoubleSide.
Please comment on the following interpretations:
(1) FrontSide: If the triangle normal is pointing toward the camera, that triangle is accepted for rendering. Else it is culled. The normal assigned to the triangle will be used if rendered.
(2) BackSide: If the triangle normal is pointing away from the camera, that triangle is accepted for rendering. Else it is culled. The normal assigned to the triangle is used if rendered.
(3) DoubleSide: The triangle is blindly accepted for rendering. There is no culling. Does rendering happen twice, once with the assigned triangle normal and once with the inverse? How are the 2 colors computed for a pixel combined?
(4) If my model consists of OPAQUE meshes that form geometrically closed bodies, and if all triangle normals are outward facing, then I can safely set the material of all meshes to FrontSide, and thereby take advantage of culling
How do I have to adjust this setting if some meshes are TRANSPARENT?
In case (3) no triangle is rendered twice1, and whichever side faces away from the camera is ignored, but there’s a higher likelihood of overdraw (see last paragraph of Fillrate | Wikipedia), and a higher performance cost as a result.
Case (4) is correct. It is considered best practice to use FrontSide where possible, for performance reasons.
Adding transparency into the mix, there is no simple answer. Sometimes you want the interior of the mesh to be visible, sometimes you don’t. material.depthWrite should be disabled if you want to see the interior, but there are other difficulties involved with rendering multiple layers of transparent materials.
Yeah true, it is more complicated than just ignoring one of the two sides, we need to adjust normals and tangents. But for the purposes here, a triangle is drawn once.