@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.22 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{WaterDistortionPassParameters as e}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as o,getDrawBuffers as a,depthWrite as i,oitDepthTest as n,blending as d}from"../lib/OrderIndependentTransparency.js";import{W as l}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as p,defaultColorWrite as c}from"../../../webgl/renderState.js";class u extends e{}class h extends s{constructor(r,e){super(r,e,new t(l,(()=>import("../shaders/WaterSurface.glsl.js"))))}initializePipeline(e){const{oitPass:t,output:s,transparent:l,draped:u}=e;return p({blending:s!==r.Normal&&s!==r.Highlight&&s!==r.ObjectAndLayerIdColor&&l?d(t):null,depthTest:u?null:{func:n(t)},depthWrite:i(e),drawBuffers:a(t,s),colorWrite:c,polygonOffset:o(e)})}}export{u as WaterMaterialPassParameters,h as WaterTechnique};