<!-- SOLID CITY · part 3382 -->
 Ke=I.toneMapping;I.toneMapping=Zn;let it=H.viewport;if(H.viewport!==void 0&&(H.viewport=void 0),E.setupLightsView(H),re===!0&&De.setGlobalState(I.clippingPlanes,H),La(S,W,H),Z.updateMultisampleRenderTarget(Me),Z.updateRenderTargetMipmap(Me),nt.has("WEBGL_multisampled_render_to_texture")===!1){let Re=!1;for(let gt=0,zt=U.length;gt<zt;gt++){let At=U[gt],{object:St,geometry:en,material:Ee,group:hn}=At;if(Ee.side===vn&&St.layers.test(H.layers)){let lt=Ee.side;Ee.side=jt,Ee.needsUpdate=!0,bu(St,W,H,en,Ee,hn),Ee.side=lt,Ee.needsUpdate=!0,Re=!0}}Re===!0&&(Z.updateMultisampleRenderTarget(Me),Z.updateRenderTargetMipmap(Me))}I.setRenderTarget(ye,Ae,Ie),I.setClearColor(dt,tt),it!==void 0&&(H.viewport=it),I.toneMapping=Ke}function La(S,U,W){let H=U.isScene===!0?U.overrideMaterial:null;for(let k=0,Me=S.length;k<Me;k++){let Te=S[k],{object:ye,geometry:Ae,group:Ie}=Te,Ke=Te.material;Ke.allowOverride===!0&&H!==null&&(Ke=H),ye.layers.test(W.layers)&&bu(ye,U,W,Ae,Ke,Ie)}}function bu(S,U,W,H,k,Me){O!==null&&k.isNodeMaterial&&O.setObject(S,k),S.onBeforeRender(I,U,W,H,k,Me),S.modelViewMatrix.multiplyMatrices(W.matrixWorldInverse,S.matrixWorld),S.normalMatrix.getNormalMatrix(S.modelViewMatrix),k.onBeforeRender(I,U,W,H,S,Me),k.transparent===!0&&k.side===vn&&k.forceSinglePass===!1?(k.side=jt,k.needsUpdate=!0,I.renderBufferDirect(W,U,H,k,S,Me),k.side=Vi,k.needsUpdate=!0,I.renderBufferDirect(W,U,H,k,S,Me),k.side=vn):I.renderBufferDirect(W,U,H,k,S,Me),S.onAfterRender(I,U,W,H,k,Me)}function Da(S,U,W){U.isScene!==!0&&(U=Fe);let H=G.get(S),k=E.state.lights,Me=E.state.shadowsArray,Te=k.state.version,ye=de.getParameters(S,k.state,Me,U,W,E.state.lightProbeGridArray),Ae=de.getProgramCacheKey(ye),Ie=H.programs;H.environment=S.isMeshStandardMaterial||S.isMeshLambertMaterial||S.isMeshPhongMaterial?U.environment:null,H.fog=U.fog;let Ke=S.isMeshStandardMaterial||S.isMeshLambertMaterial&&!S.envMap||S.isMeshPhongMaterial&&!S.envMap;H.envMap=ce.get(S.envMap||H.environment,Ke),H.envMapRotation=H.environment!==null&&S.envMap===null?U.environmentRotation:S.envMapRotation,Ie===void 0&&(S.addEventListener("dispose",ei),Ie=new Map,H.programs=Ie);let it=Ie.get(Ae);if(it!==void 0){if(H.currentProgram===it&&H.lightsStateVersion===Te)return Tu(S,ye),it}else ye.uniforms=de.getUniforms(S),O!==null&&S.isNodeMaterial&&O.build(S,W,ye),S.onBeforeCompile(ye,I),it=de.acquireProgram(ye,Ae),Ie.set(Ae,it),H.uniforms=ye.uniforms;let Re=H.uniforms;return(!S.isShaderMaterial&&!S.isRawShaderMaterial||S.clipping===!0)&&(Re.clippingPlanes=De.uniform),Tu(S,ye),H.needsLights=Sp(S),H.lightsStateVersion=Te,H.needsLights&&(Re.ambientLightColor.value=k.state.ambient,Re.lightProbe.value=k.state.probe,Re.sunLights.value=k.state.sun,Re.sunLightShadows.value=k.state.sunShadow,Re.directionalLights.value=k.state.directional,Re.directionalLightShadows.value=k.state.directionalShadow,Re.spotLights.value=k.state.spot,Re.spotLightShadows.value=k.state.spotShadow,Re.rectAreaLights.value=k.state.rectArea,Re.ltc_1.value=k.state.rectAreaLTC1,Re.ltc_2.value=k.state.rectAreaLTC2,Re.pointLights.value=k.state.point,Re.pointLightShadows.value=k.state.pointShadow,Re.hemisphereLights.value=k.state.hemi,Re.sunShadowMatrix.value=k.state.sunShadowMatrix,Re.sunShadowCascade.value=k.state.sunShadowCascade,Re.directionalShadowMatrix.value=k.state.directionalShadowMatrix,Re.spotLightMatrix.value=k.state.spotLightMatrix,Re.spotLightMap.value=k.state.spotLightMap,Re.pointShadowMatrix.value=k.state.pointShadowMatrix),H.lightProbeGrid=E.state.lightProbeGridArray.length>0,H.currentProgram=it,H.uniformsList=null,it}function Eu(S){if(S.uniformsList===null){let U=S.currentProgram.getUniforms();S.uniformsList=or.seqWithValue(U.seq,S.uniforms)}return S.uniformsList}function Tu(S,U){let W=G.get(S);W.outputColorSpace=U.outputColorSpace,W.batching=U.batching,W.batchingColor=U.batchingColor,W.instancing=U.instancing,W.instancingColor=U.instancingColor,W.instancingMorph=U.instancingMorph,W.skinning=U.skinning,W.morphTargets=U.morphTargets,W.morphNormals=U.morphNormals,W.morphColors=U.morphColors,W.morphTargetsCount=U.morphTargetsCount,W.numClippingPlanes=U.numClippingPlanes,W.numIntersection=U.numClipIntersection,W.vertexAlphas=U.vertexAlphas,W.vertexTangents=U.vertexTangents,W.toneMapping=U.toneMapping}function vp(S,U){if(S.length===0)return null;if(S.length===1)return S[0].texture!==null?S[0]:null;v.setFromMatrixPosition(U.matrixWorld);for(let W=0,H=S.length;W<H;W++){let k=S[W];if(k.texture!==null&&k.boundingBox.containsPoint(v))return k}return null}function yp(S,U,W,H,k){U.isScene!==!0&&(U=Fe),Z.resetTextureUnits();let Me=U.fog,Te=H.isMeshStandardMaterial||H.isMeshLambertMaterial||H.isMeshPhongMaterial?U.environment:null,ye=ie===null?I.outputColorSpace:ie.isXRRenderTarget===!0?ie.texture.colorSpace:rt.workingColorSpace,Ae=H.isMeshStandardMaterial||H.isMeshLambertMaterial&&!H.envMap||H.isMeshPhongMaterial&&!H.envMap,Ie=ce.get(H.envMap||Te,Ae),Ke=H.vertexColors===!0&&!!W.attributes.color&