renderScene method
void
renderScene(
- WebGLRenderList currentRenderList,
- Object3D scene,
- Camera camera, [
- Vector4? viewport,
Implementation
void renderScene(
WebGLRenderList currentRenderList, Object3D scene, Camera camera,
[Vector4? viewport]) {
List<RenderItem> opaqueObjects = currentRenderList.opaque;
var transmissiveObjects = currentRenderList.transmissive;
var transparentObjects = currentRenderList.transparent;
currentRenderState!.setupLightsView(camera);
if (transmissiveObjects.isNotEmpty) {
renderTransmissionPass(opaqueObjects, scene, camera);
}
if (viewport != null) state.viewport(_currentViewport.copy(viewport));
if (opaqueObjects.isNotEmpty) renderObjects(opaqueObjects, scene, camera);
if (transmissiveObjects.isNotEmpty) {
renderObjects(transmissiveObjects, scene, camera);
}
if (transparentObjects.isNotEmpty) {
renderObjects(transparentObjects, scene, camera);
}
// Ensure depth buffer writing is enabled so it can be cleared on next render
state.buffers["depth"].setTest(true);
state.buffers["depth"].setMask(true);
state.buffers["color"].setMask(true);
state.setPolygonOffset(false, null, null);
}