import{a as t,b as n}from"./index-T8LZyOXI.js";import{G as o}from"./geometryBufferRenderer-Dl9ho9Ds.js";import"./index-BkylzejB.js";import"./clipPlaneFragment-CB3vQ-EQ.js";import"./bumpFragment-DQ4eHHfm.js";import"./helperFunctions-6mbvi6Fq.js";import"./bakedVertexAnimation-D-gtl_rU.js";import"./morphTargetsVertex-DYlx_qbU.js";import"./instancesDeclaration-CjO2rSez.js";import"./sceneUboDeclaration-BpTyN3SY.js";import"./clipPlaneVertex-Db1nlgNR.js";import"./bumpVertex-BDJMmcOD.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};
