@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 3.07 kB
JavaScript
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutput.js";import{NoParameters as r}from"../core/shaderModules/interfaces.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as a}from"../lib/basicInterfaces.js";import{Default3D as n}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as l,oitDepthTest as p,oitDepthWrite as c,getOITPolygonOffset as u}from"../lib/OrderIndependentTransparency.js";import{Program as h}from"../lib/Program.js";import{stencilWriteMaskOn as d,stencilToolMaskBaseParams as m,stencilBaseAllZerosParams as f}from"../lib/StencilUtils.js";import{TransparencyPassType as y}from"../lib/TransparencyPassType.js";import{DefaultTechniqueConfiguration as b}from"../materials/DefaultTechniqueConfiguration.js";import{I as g}from"../../../../chunks/ImageMaterial.glsl.js";import{BlendFactor as T}from"../../../webgl/enums.js";import{simpleBlendingParams as P,makePipelineState as j,cullingParams as O,defaultDepthWriteParams as S,defaultColorWriteParams as v}from"../../../webgl/renderState.js";class N extends r{}class _ extends s{initializeProgram(e){return new h(e.rctx,_.shader.get().build(this.configuration),n)}_setPipelineState(e,r){const i=this.configuration,s=e===y.NONE,o=e===y.FrontFace;return j({blending:i.output!==t.Color&&i.output!==t.Alpha||!i.transparent?null:s?C:l(e),culling:O(i.cullFace),depthTest:{func:p(e)},depthWrite:s?i.writeDepth?S:null:c(e),colorWrite:v,stencilWrite:i.hasOccludees?d:null,stencilTest:i.hasOccludees?r?m:f:null,polygonOffset:s||o?null:u(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipelineState(this.configuration.transparencyPassType,!0),this._setPipelineState(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}_.shader=new i(g,(()=>import("./ImageMaterial.glsl.js")));const C=P(T.ONE,T.ONE_MINUS_SRC_ALPHA);class w extends b{constructor(){super(...arguments),this.output=t.Color,this.cullFace=a.None,this.hasSlicePlane=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!0,this.hasOccludees=!1,this.transparencyPassType=y.NONE,this.hasMultipassTerrain=!1,this.cullAboveGround=!1}}e([o({count:t.COUNT})],w.prototype,"output",void 0),e([o({count:a.COUNT})],w.prototype,"cullFace",void 0),e([o()],w.prototype,"hasSlicePlane",void 0),e([o()],w.prototype,"transparent",void 0),e([o()],w.prototype,"enableOffset",void 0),e([o()],w.prototype,"writeDepth",void 0),e([o()],w.prototype,"hasOccludees",void 0),e([o({count:y.COUNT})],w.prototype,"transparencyPassType",void 0),e([o()],w.prototype,"hasMultipassTerrain",void 0),e([o()],w.prototype,"cullAboveGround",void 0);export{N as ImageMaterialPassParameters,_ as ImageMaterialTechnique,w as ImageMaterialTechniqueConfiguration};