1import{S as e}from"./index-0LhFotdt.js";const r="bayerDitherFunctions",d=`float bayerDither2(vec2 _P) {return mod(2.0*_P.y+_P.x+1.0,4.0);} 2float bayerDither4(vec2 _P) {vec2 P1=mod(_P,2.0); 3vec2 P2=floor(0.5*mod(_P,4.0)); 4return 4.0*bayerDither2(P1)+bayerDither2(P2);} 5float bayerDither8(vec2 _P) {vec2 P1=mod(_P,2.0); 6vec2 P2=floor(0.5 *mod(_P,4.0)); 7vec2 P4=floor(0.25*mod(_P,8.0)); 8return 4.0*(4.0*bayerDither2(P1)+bayerDither2(P2))+bayerDither2(P4);} 9`;e.IncludesShadersStore[r]||(e.IncludesShadersStore[r]=d);const t="shadowMapFragmentExtraDeclaration",o=`#if SM_FLOAT==0 10#include<packingFunctions> 11#endif 12#if SM_SOFTTRANSPARENTSHADOW==1 13#include<bayerDitherFunctions> 14uniform vec2 softTransparentShadowSM; 15#endif 16varying float vDepthMetricSM; 17#if SM_USEDISTANCE==1 18uniform vec3 lightDataSM;varying vec3 vPositionWSM; 19#endif 20uniform vec3 biasAndScaleSM;uniform vec2 depthValuesSM; 21#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1 22varying float zSM; 23#endif 24`;e.IncludesShadersStore[t]||(e.IncludesShadersStore[t]=o);const i="shadowMapFragment",n=`float depthSM=vDepthMetricSM; 25#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP==1 26#if SM_USEDISTANCE==1 27depthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x; 28#else 29#ifdef USE_REVERSE_DEPTHBUFFER 30depthSM=(-zSM+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x; 31#else 32depthSM=(zSM+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x; 33#endif 34#endif 35depthSM=clamp(depthSM,0.0,1.0); 36#ifdef USE_REVERSE_DEPTHBUFFER 37gl_FragDepth=clamp(1.0-depthSM,0.0,1.0); 38#else 39gl_FragDepth=clamp(depthSM,0.0,1.0); 40#endif 41#elif SM_USEDISTANCE==1 42depthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/depthValuesSM.y+biasAndScaleSM.x; 43#endif 44#if SM_ESM==1 45depthSM=clamp(exp(-min(87.,biasAndScaleSM.z*depthSM)),0.,1.); 46#endif 47#if SM_FLOAT==1 48gl_FragColor=vec4(depthSM,1.0,1.0,1.0); 49#else 50gl_FragColor=pack(depthSM); 51#endif 52return;`;e.IncludesShadersStore[i]||(e.IncludesShadersStore[i]=n);const a="shadowMapPixelShader",S=`#include<shadowMapFragmentExtraDeclaration> 53#ifdef ALPHATEXTURE 54varying vec2 vUV;uniform sampler2D diffuseSampler; 55#endif 56#include<clipPlaneFragmentDeclaration> 57#define CUSTOM_FRAGMENT_DEFINITIONS 58void main(void) 59{ 60#include<clipPlaneFragment> 61#ifdef ALPHATEXTURE 62vec4 opacityMap=texture2D(diffuseSampler,vUV);float alphaFromAlphaTexture=opacityMap.a; 63#if SM_SOFTTRANSPARENTSHADOW==1 64if (softTransparentShadowSM.y==1.0) {opacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11);alphaFromAlphaTexture=opacityMap.x+opacityMap.y+opacityMap.z;} 65#endif 66#ifdef ALPHATESTVALUE 67if (alphaFromAlphaTexture<ALPHATESTVALUE) 68discard; 69#endif 70#endif 71#if SM_SOFTTRANSPARENTSHADOW==1 72#ifdef ALPHATEXTURE 73if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM.x*alphaFromAlphaTexture) discard; 74#else 75if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM.x) discard; 76#endif 77#endif 78#include<shadowMapFragment> 79}`;e.ShadersStore[a]||(e.ShadersStore[a]=S);const M={name:a,shader:S};export{M as shadowMapPixelShader};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.