<!-- SOLID-PLAYTIME · part 158 -->
al||J.isMeshLambertMaterial||J.isMeshBasicMaterial||J.isMeshStandardMaterial||J.isShaderMaterial)We.setValue(D,"isOrthographic",_.isOrthographicCamera===!0);if(b!==_)b=_,jn=!0,sl=!0}if(N.isSkinnedMesh){We.setOptional(D,N,"bindMatrix"),We.setOptional(D,N,"bindMatrixInverse");let In=N.skeleton;if(In){if(In.boneTexture===null)In.computeBoneTexture();We.setValue(D,"boneTexture",In.boneTexture,It)}}if(N.isBatchedMesh){if(We.setOptional(D,N,"batchingTexture"),We.setValue(D,"batchingTexture",N._matricesTexture,It),We.setOptional(D,N,"batchingIdTexture"),We.setValue(D,"batchingIdTexture",N._indirectTexture,It),We.setOptional(D,N,"batchingColorTexture"),N._colorsTexture!==null)We.setValue(D,"batchingColorTexture",N._colorsTexture,It)}let pi=G.morphAttributes;if(pi.position!==void 0||pi.normal!==void 0||pi.color!==void 0)ft.update(N,G,Kn);if(jn||zt.receiveShadow!==N.receiveShadow)zt.receiveShadow=N.receiveShadow,We.setValue(D,"receiveShadow",N.receiveShadow);if(J.isMeshGouraudMaterial&&J.envMap!==null)di.envMap.value=wt,di.flipEnvMap.value=wt.isCubeTexture&&wt.isRenderTargetTexture===!1?-1:1;if(J.isMeshStandardMaterial&&J.envMap===null&&F.environment!==null)di.envMapIntensity.value=F.environmentIntensity;if(jn){if(We.setValue(D,"toneMappingExposure",m.toneMappingExposure),zt.needsLights)o_(di,sl);if(ut&&J.fog===!0)tt.refreshFogUniforms(di,ut);tt.refreshMaterialUniforms(di,J,at,Z,U.state.transmissionRenderTarget[_.id]),Gc.upload(D,sg(zt),di,It)}if(J.isShaderMaterial&&J.uniformsNeedUpdate===!0)Gc.upload(D,sg(zt),di,It),J.uniformsNeedUpdate=!1;if(J.isSpriteMaterial)We.setValue(D,"center",N.center);if(We.setValue(D,"modelViewMatrix",N.modelViewMatrix),We.setValue(D,"normalMatrix",N.normalMatrix),We.setValue(D,"modelMatrix",N.matrixWorld),J.isShaderMaterial||J.isRawShaderMaterial){let In=J.uniformsGroups;for(let zn=0,jf=In.length;zn<jf;zn++){let Sa=In[zn];gt.update(Sa,Kn),gt.bind(Sa,Kn)}}return Kn}function o_(_,F){_.ambientLightColor.needsUpdate=F,_.lightProbe.needsUpdate=F,_.directionalLights.needsUpdate=F,_.directionalLightShadows.needsUpdate=F,_.pointLights.needsUpdate=F,_.pointLightShadows.needsUpdate=F,_.spotLights.needsUpdate=F,_.spotLightShadows.needsUpdate=F,_.rectAreaLights.needsUpdate=F,_.hemisphereLights.needsUpdate=F}function l_(_){return _.isMeshLambertMaterial||_.isMeshToonMaterial||_.isMeshPhongMaterial||_.isMeshStandardMaterial||_.isShadowMaterial||_.isShaderMaterial&&_.lights===!0}this.getActiveCubeFace=function(){return S},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return T},this.setRenderTargetTextures=function(_,F,G){let J=Dt.get(_);if(J.__autoAllocateDepthBuffer=_.resolveDepthBuffer===!1,J.__autoAllocateDepthBuffer===!1)J.__useRenderToTexture=!1;Dt.get(_.texture).__webglTexture=F,Dt.get(_.depthTexture).__webglTexture=J.__autoAllocateDepthBuffer?void 0:G,J.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(_,F){let G=Dt.get(_);G.__webglFramebuffer=F,G.__useDefaultFramebuffer=F===void 0};let c_=D.createFramebuffer();this.setRenderTarget=function(_,F=0,G=0){T=_,S=F,A=G;let J=!0,N=null,ut=!1,Mt=!1;if(_){let wt=Dt.get(_);if(wt.__useDefaultFramebuffer!==void 0)St.bindFramebuffer(D.FRAMEBUFFER,null),J=!1;else if(wt.__webglFramebuffer===void 0)It.setupRenderTarget(_);else if(wt.__hasExternalTextures)It.rebindTextures(_,Dt.get(_.texture).__webglTexture,Dt.get(_.depthTexture).__webglTexture);else if(_.depthBuffer){let Ot=_.depthTexture;if(wt.__boundDepthTexture!==Ot){if(Ot!==null&&Dt.has(Ot)&&(_.width!==Ot.image.width||_.height!==Ot.image.height))throw Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");It.setupDepthRenderbuffer(_)}}let Vt=_.texture;if(Vt.isData3DTexture||Vt.isDataArrayTexture||Vt.isCompressedArrayTexture)Mt=!0;let $t=Dt.get(_).__webglFramebuffer;if(_.isWebGLCubeRenderTarget){if(Array.isArray($t[F]))N=$t[F][G];else N=$t[F];ut=!0}else if(_.samples>0&&It.useMultisampledRTT(_)===!1)N=Dt.get(_).__webglMultisampledFramebuffer;else if(Array.isArray($t))N=$t[G];else N=$t;M.copy(_.viewport),R.copy(_.scissor),O=_.scissorTest}else M.copy(mt).multiplyScalar(at).floor(),R.copy(q).multiplyScalar(at).floor(),O=dt;if(G!==0)N=c_;if(St.bindFramebuffer(D.FRAMEBUFFER,N)&&J)St.drawBuffers(_,N);if(St.viewport(M),St.scissor(R),St.setScissorTest(O),ut){let wt=Dt.get(_.texture);D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_CUBE_MAP_POSITIVE_X+F,wt.__webglTexture,G)}else if(Mt){let wt=F;for(let Vt=0;Vt<_.textures.length;Vt++){let $t=Dt.get(_.textures[Vt]);D.framebufferTextureLayer(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0+Vt,$t.__webglTexture,G,wt)}}else if(_!==null&&G!==0){let wt=Dt.get(_.texture);D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_2D,wt.__webglTexture,G)}w=-1},this.readRenderTargetPixels=function(_,F,G,J,N,ut,Mt,Pt=0){if(!(_&&_.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget