UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 883 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{Effect as e}from"./Effect.js";import{TextureSamplingMode as t}from"../../../../webgl/enums.js";class s extends e{constructor(e){super(),this.name=this.constructor.name,this.defines=[e]}dispose(){}bind({context:e,painter:t}){this._prev=e.getBoundFramebufferObject();const s=t.getFbos().effect0;e.bindFramebuffer(s),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(e.gl.COLOR_BUFFER_BIT)}unbind(){}draw(e,s){const{context:r,painter:o}=e,n=o.getPostProcessingEffects(s),c=r.getBoundFramebufferObject();for(const{postProcessingEffect:t,effect:f}of n)t.draw(e,c,f);r.bindFramebuffer(this._prev),r.setStencilTestEnabled(!1),o.blitTexture(r,c.colorTexture,t.NEAREST),r.setStencilTestEnabled(!0)}}export{s as FeatureEffect};