@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
3 lines (2 loc) • 838 B
JavaScript
import{S as e}from"./index-Bw2N6w1y.esm.min.js";const a="envShadowGroundPixelShader",r="precision highp float;uniform sampler2D shadowTexture;uniform vec2 renderTargetSize;uniform float shadowOpacity;varying vec2 vUV;void main(void) {float uvBasedOpacity=clamp(length(vUV*vec2(2.0)-vec2(1.0)),0.0,1.0);uvBasedOpacity=uvBasedOpacity*uvBasedOpacity;uvBasedOpacity=1.0-uvBasedOpacity;vec2 screenUv=gl_FragCoord.xy/renderTargetSize;vec3 shadowValue=texture2D(shadowTexture,screenUv).rrr;float totalOpacity=shadowOpacity*uvBasedOpacity;vec3 invertedShadowValue=vec3(1.0)-shadowValue;gl_FragColor.rgb=shadowValue;gl_FragColor.a=invertedShadowValue.r*totalOpacity;}";e.ShadersStore[a]||(e.ShadersStore[a]=r);const o={name:a,shader:r};export{o as envShadowGroundPixelShader};
//# sourceMappingURL=envShadowGround.fragment-CXY2vFuF.esm.min.js.map