<!-- SOLUV · part 650 -->
smissionResolutionScale);let vt=I.getRenderTarget(),Ct=I.getActiveCubeFace(),Pt=I.getActiveMipmapLevel();I.setRenderTarget(yt),I.getClearColor(se),Qt=I.getClearAlpha(),Qt<1&&I.setClearColor(16777215,.5),I.clear(),Ht&&Zt.render(H);let $t=I.toneMapping;I.toneMapping=An;let te=V.viewport;if(V.viewport!==void 0&&(V.viewport=void 0),T.setupLightsView(V),rt===!0&&Ut.setGlobalState(I.clippingPlanes,V),ha(M,H,V),Y.updateMultisampleRenderTarget(yt),Y.updateRenderTargetMipmap(yt),jt.has("WEBGL_multisampled_render_to_texture")===!1){let Rt=!1;for(let le=0,we=N.length;le<we;le++){let xe=N[le],{object:me,geometry:Be,material:Et,group:Xe}=xe;if(Et.side===On&&me.layers.test(V.layers)){let ie=Et.side;Et.side=$e,Et.needsUpdate=!0,pd(me,H,V,Be,Et,Xe),Et.side=ie,Et.needsUpdate=!0,Rt=!0}}Rt===!0&&(Y.updateMultisampleRenderTarget(yt),Y.updateRenderTargetMipmap(yt))}I.setRenderTarget(vt,Ct,Pt),I.setClearColor(se,Qt),te!==void 0&&(V.viewport=te),I.toneMapping=$t}function ha(M,N,H){let V=N.isScene===!0?N.overrideMaterial:null;for(let k=0,yt=M.length;k<yt;k++){let At=M[k],{object:vt,geometry:Ct,group:Pt}=At,$t=At.material;$t.allowOverride===!0&&V!==null&&($t=V),vt.layers.test(H.layers)&&pd(vt,N,H,Ct,$t,Pt)}}function pd(M,N,H,V,k,yt){F!==null&&k.isNodeMaterial&&F.setObject(M,k),M.onBeforeRender(I,N,H,V,k,yt),M.modelViewMatrix.multiplyMatrices(H.matrixWorldInverse,M.matrixWorld),M.normalMatrix.getNormalMatrix(M.modelViewMatrix),k.onBeforeRender(I,N,H,V,M,yt),k.transparent===!0&&k.side===On&&k.forceSinglePass===!1?(k.side=$e,k.needsUpdate=!0,I.renderBufferDirect(H,N,V,k,M,yt),k.side=vi,k.needsUpdate=!0,I.renderBufferDirect(H,N,V,k,M,yt),k.side=On):I.renderBufferDirect(H,N,V,k,M,yt),M.onAfterRender(I,N,H,V,k,yt)}function ua(M,N,H){N.isScene!==!0&&(N=Ot);let V=G.get(M),k=T.state.lights,yt=T.state.shadowsArray,At=k.state.version,vt=dt.getParameters(M,k.state,yt,N,H,T.state.lightProbeGridArray),Ct=dt.getProgramCacheKey(vt),Pt=V.programs;V.environment=M.isMeshStandardMaterial||M.isMeshLambertMaterial||M.isMeshPhongMaterial?N.environment:null,V.fog=N.fog;let $t=M.isMeshStandardMaterial||M.isMeshLambertMaterial&&!M.envMap||M.isMeshPhongMaterial&&!M.envMap;V.envMap=lt.get(M.envMap||V.environment,$t),V.envMapRotation=V.environment!==null&&M.envMap===null?N.environmentRotation:M.envMapRotation,Pt===void 0&&(M.addEventListener("dispose",Cn),Pt=new Map,V.programs=Pt);let te=Pt.get(Ct);if(te!==void 0){if(V.currentProgram===te&&V.lightsStateVersion===At)return gd(M,vt),te}else vt.uniforms=dt.getUniforms(M),F!==null&&M.isNodeMaterial&&F.build(M,H,vt),M.onBeforeCompile(vt,I),te=dt.acquireProgram(vt,Ct),Pt.set(Ct,te),V.uniforms=vt.uniforms;let Rt=V.uniforms;return(!M.isShaderMaterial&&!M.isRawShaderMaterial||M.clipping===!0)&&(Rt.clippingPlanes=Ut.uniform),gd(M,vt),V.needsLights=um(M),V.lightsStateVersion=At,V.needsLights&&(Rt.ambientLightColor.value=k.state.ambient,Rt.lightProbe.value=k.state.probe,Rt.sunLights.value=k.state.sun,Rt.sunLightShadows.value=k.state.sunShadow,Rt.directionalLights.value=k.state.directional,Rt.directionalLightShadows.value=k.state.directionalShadow,Rt.spotLights.value=k.state.spot,Rt.spotLightShadows.value=k.state.spotShadow,Rt.rectAreaLights.value=k.state.rectArea,Rt.ltc_1.value=k.state.rectAreaLTC1,Rt.ltc_2.value=k.state.rectAreaLTC2,Rt.pointLights.value=k.state.point,Rt.pointLightShadows.value=k.state.pointShadow,Rt.hemisphereLights.value=k.state.hemi,Rt.sunShadowMatrix.value=k.state.sunShadowMatrix,Rt.sunShadowCascade.value=k.state.sunShadowCascade,Rt.directionalShadowMatrix.value=k.state.directionalShadowMatrix,Rt.spotLightMatrix.value=k.state.spotLightMatrix,Rt.spotLightMap.value=k.state.spotLightMap,Rt.pointShadowMatrix.value=k.state.pointShadowMatrix),V.lightProbeGrid=T.state.lightProbeGridArray.length>0,V.currentProgram=te,V.uniformsList=null,te}function md(M){if(M.uniformsList===null){let N=M.currentProgram.getUniforms();M.uniformsList=qs.seqWithValue(N.seq,M.uniforms)}return M.uniformsList}function gd(M,N){let H=G.get(M);H.outputColorSpace=N.outputColorSpace,H.batching=N.batching,H.batchingColor=N.batchingColor,H.instancing=N.instancing,H.instancingColor=N.instancingColor,H.instancingMorph=N.instancingMorph,H.skinning=N.skinning,H.morphTargets=N.morphTargets,H.morphNormals=N.morphNormals,H.morphColors=N.morphColors,H.morphTargetsCount=N.morphTargetsCount,H.numClippingPlanes=N.numClippingPlanes,H.numIntersection=N.numClipIntersection,H.vertexAlphas=N.vertexAlphas,H.vertexTangents=N.vertexTangents,H.toneMapping=N.toneMapping}function lm(M,N){if(M.length===0)return null;if(M.length===1)return M[0].texture!==null?M[0]:null;x.setFromMatrixPosition(N.matrixWorld);for(let H=0,V=M.length;H<V;H++){let k=M[H];if(k.texture!==null&&k.boundingBox.containsPoint(x))return k}return null}function cm(M,N,H,V,k){N.isScene!==!0&&(N=Ot),Y.resetTextureUnits();let yt=N.fog,At=V.isMeshStandardMaterial||V.isMeshLambertMaterial||V.isMeshPhongMaterial?N.environment:null,vt=st===null?I.outputColorSpace:st.isXRRen