import{a as t,b as n}from"./index-CDrXokXW.js";import{G as o}from"./geometryBufferRenderer-GNaIIBSt.js";import"./index-DWyDLubb.js";import"./clipPlaneFragment-T8W7CIC5.js";import"./bumpFragment-CNMCo4HD.js";import"./helperFunctions-BkWNqKeI.js";import"./bakedVertexAnimation-BwUJBnNt.js";import"./morphTargetsVertex-7Q90Wwr8.js";import"./instancesDeclaration-BAnfKLCo.js";import"./sceneUboDeclaration-C4vXUqkq.js";import"./clipPlaneVertex-Bmw4TNCQ.js";import"./bumpVertex-B5e3s1jQ.js";Object.defineProperty(n.prototype,"geometryBufferRenderer",{get:function(){return this._geometryBufferRenderer},set:function(e){e&&e.isSupported&&(this._geometryBufferRenderer=e)},enumerable:!0,configurable:!0});n.prototype.enableGeometryBufferRenderer=function(e=1,r=15,i){return this._geometryBufferRenderer?this._geometryBufferRenderer:(this._geometryBufferRenderer=new o(this,e,r,i),this._geometryBufferRenderer.isSupported||(this._geometryBufferRenderer=null),this._geometryBufferRenderer)};n.prototype.disableGeometryBufferRenderer=function(){this._geometryBufferRenderer&&(this._geometryBufferRenderer.dispose(),this._geometryBufferRenderer=null)};class f{constructor(r){this.name=t.NAME_GEOMETRYBUFFERRENDERER,this.scene=r}register(){this.scene._gatherRenderTargetsStage.registerStep(t.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER,this,this._gatherRenderTargets)}rebuild(){}dispose(){}_gatherRenderTargets(r){this.scene._geometryBufferRenderer&&r.push(this.scene._geometryBufferRenderer.getGBuffer())}}o._SceneComponentInitialization=e=>{let r=e._getComponent(t.NAME_GEOMETRYBUFFERRENDERER);r||(r=new f(e),e._addComponent(r))};export{f as GeometryBufferRendererSceneComponent};
