/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{WaterDistortionPassParameters as s}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as i}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as a,drawBuffers as n,depthWrite as l,depthTest as d,blending as m}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidGLLayout as p,PositionUvf32GLLayout as c}from"./DefaultLayouts.js";import{W as f}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as u,defaultColorWrite as h}from"../../../webgl/renderState.js";class g extends s{}let j=class extends o{constructor(e,r){super(e,r,i()?p:c),this.shader=new t(f,()=>import("../shaders/WaterSurface.glsl.js"))}initializePipeline(e){const{oitPass:r,output:s,hasEmission:t,transparent:o,draped:i}=e;return u({blending:2!==s&&8!==s&&9!==s&&o?m(r):null,depthTest:i?null:d(r),depthWrite:l(e),drawBuffers:n(r,t),colorWrite:h,polygonOffset:a(e)})}};j=e([r("esri.views.3d.webgl-engine.materials.WaterTechnique")],j);export{g as WaterMaterialPassParameters,j as WaterTechnique};
