<!-- SOLID-PLAYTIME · part 150 -->
eight;

void main() {

	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );

	if ( coord.x >= 1.0 ) {

		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;

	} else {

		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;

	}

}`;class MM{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e){if(this.texture===null){let n=new Of(t.texture);if(t.depthNear!==e.depthNear||t.depthFar!==e.depthFar)this.depthNear=t.depthNear,this.depthFar=t.depthFar;this.texture=n}}getMesh(t){if(this.texture!==null){if(this.mesh===null){let e=t.cameras[0].viewport,n=new Zi({vertexShader:y3,fragmentShader:x3,uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new At(new qn(20,20),n)}}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class _M extends _a{constructor(t,e){super();let n=this,i=null,s=1,a=null,r="local-floor",o=1,l=null,c=null,u=null,f=null,h=null,p=null,v=typeof XRWebGLBinding<"u",y=new MM,U={},d=e.getContextAttributes(),g=null,m=null,x=[],S=[],A=new Nt,T=null,w=new xn;w.viewport=new Le;let b=new xn;b.viewport=new Le;let M=[w,b],R=new zU,O=null,V=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let ot=x[X];if(ot===void 0)ot=new Fc,x[X]=ot;return ot.getTargetRaySpace()},this.getControllerGrip=function(X){let ot=x[X];if(ot===void 0)ot=new Fc,x[X]=ot;return ot.getGripSpace()},this.getHand=function(X){let ot=x[X];if(ot===void 0)ot=new Fc,x[X]=ot;return ot.getHandSpace()};function k(X){let ot=S.indexOf(X.inputSource);if(ot===-1)return;let Y=x[ot];if(Y!==void 0)Y.update(X.inputSource,X.frame,l||a),Y.dispatchEvent({type:X.type,data:X.inputSource})}function et(){i.removeEventListener("select",k),i.removeEventListener("selectstart",k),i.removeEventListener("selectend",k),i.removeEventListener("squeeze",k),i.removeEventListener("squeezestart",k),i.removeEventListener("squeezeend",k),i.removeEventListener("end",et),i.removeEventListener("inputsourceschange",Z);for(let X=0;X<x.length;X++){let ot=S[X];if(ot===null)continue;S[X]=null,x[X].disconnect(ot)}O=null,V=null,y.reset();for(let X in U)delete U[X];t.setRenderTarget(g),h=null,f=null,u=null,i=null,m=null,Et.stop(),n.isPresenting=!1,t.setPixelRatio(T),t.setSize(A.width,A.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(X){if(s=X,n.isPresenting===!0)console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(X){if(r=X,n.isPresenting===!0)console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(X){l=X},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){if(u===null&&v)u=new XRWebGLBinding(i,e);return u},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=async function(X){if(i=X,i!==null){if(g=t.getRenderTarget(),i.addEventListener("select",k),i.addEventListener("selectstart",k),i.addEventListener("selectend",k),i.addEventListener("squeeze",k),i.addEventListener("squeezestart",k),i.addEventListener("squeezeend",k),i.addEventListener("end",et),i.addEventListener("inputsourceschange",Z),d.xrCompatible!==!0)await e.makeXRCompatible();if(T=t.getPixelRatio(),t.getSize(A),!(v&&("createProjectionLayer"in XRWebGLBinding.prototype))){let Y={antialias:d.antialias,alpha:!0,depth:d.depth,stencil:d.stencil,framebufferScaleFactor:s};h=new XRWebGLLayer(i,e,Y),i.updateRenderState({baseLayer:h}),t.setPixelRatio(1),t.setSize(h.framebufferWidth,h.framebufferHeight,!1),m=new Is(h.framebufferWidth,h.framebufferHeight,{format:Qi,type:Ea,colorSpace:t.outputColorSpace,stencilBuffer:d.stencil,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}else{let Y=null,yt=null,Ht=null;if(d.depth)Ht=d.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,Y=d.stencil?Dc:Sf,yt=d.stencil?Wo:Jo;let vt={colorFormat:e.RGBA8,depthFormat:Ht,scaleFactor:s};u=this.getBinding(),f=u.createProjectionLayer(vt),i.updateRenderState({layers:[f]}),t.setPixelRatio(1),t.setSize(f.textureWidth,f.textureHeight,!1),m=new Is(f.textureWidth,f.textureHeight,{format:Qi,type:Ea,depthTexture:new Bf(f.textureWidth,f.textureHeight,yt,void 0,void 0,void 0,void 0,void 0,void 0,Y),stencilBuffer:d.stencil,colorSpace:t.outputColorSpace,samples:d.antialias?4:0,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}m.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await i.requestReferenceSpace(r),Et.setContext(i),Et.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return y.getDepthTexture()};function 