import{S as a}from"./Viewer-DVCEMRp5.js";import"./clipPlaneFragment-ef4zNzcj.js";import"./vuetify-Ce4WN_Dg.js";import"./overlayscrollbars-CiKU261J.js";import"./index-Bku7SJna.js";import"./echarts-DzoUeqWp.js";import"./codemirror-ZSHHXwGs.js";const e="glowMapGenerationPixelShader",i="#if defined(DIFFUSE_ISLINEAR) || defined(EMISSIVE_ISLINEAR)\n#include<helperFunctions>\n#endif\n#ifdef DIFFUSE\nvarying vUVDiffuse: vec2f;var diffuseSamplerSampler: sampler;var diffuseSampler: texture_2d<f32>;\n#endif\n#ifdef OPACITY\nvarying vUVOpacity: vec2f;var opacitySamplerSampler: sampler;var opacitySampler: texture_2d<f32>;uniform opacityIntensity: f32;\n#endif\n#ifdef EMISSIVE\nvarying vUVEmissive: vec2f;var emissiveSamplerSampler: sampler;var emissiveSampler: texture_2d<f32>;\n#endif\n#ifdef VERTEXALPHA\nvarying vColor: vec4f;\n#endif\nuniform glowColor: vec4f;uniform glowIntensity: f32;\n#include<clipPlaneFragmentDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#include<clipPlaneFragment>\nvar finalColor: vec4f=uniforms.glowColor;\n#ifdef DIFFUSE\nvar albedoTexture: vec4f=textureSample(diffuseSampler,diffuseSamplerSampler,fragmentInputs.vUVDiffuse);\n#ifdef DIFFUSE_ISLINEAR\nalbedoTexture=toGammaSpace(albedoTexture);\n#endif\n#ifdef GLOW\nfinalColor=vec4f(finalColor.rgb,finalColor.a*albedoTexture.a);\n#endif\n#ifdef HIGHLIGHT\nfinalColor=vec4f(finalColor.rgb,albedoTexture.a);\n#endif\n#endif\n#ifdef OPACITY\nvar opacityMap: vec4f=textureSample(opacitySampler,opacitySamplerSampler,fragmentInputs.vUVOpacity);\n#ifdef OPACITYRGB\nfinalColor=vec4f(finalColor.rgb,finalColor.a*getLuminance(opacityMap.rgb));\n#else\nfinalColor=vec4f(finalColor.rgb,finalColor.a*opacityMap.a);\n#endif\nfinalColor=vec4f(finalColor.rgb,finalColor.a*uniforms.opacityIntensity);\n#endif\n#ifdef VERTEXALPHA\nfinalColor=vec4f(finalColor.rgb,finalColor.a*fragmentInputs.vColor.a);\n#endif\n#ifdef ALPHATEST\nif (finalColor.a<ALPHATESTVALUE)\ndiscard;\n#endif\n#ifdef EMISSIVE\nvar emissive: vec4f=textureSample(emissiveSampler,emissiveSamplerSampler,fragmentInputs.vUVEmissive);\n#ifdef EMISSIVE_ISLINEAR\nemissive=toGammaSpace(emissive);\n#endif\nfragmentOutputs.color=emissive*finalColor*uniforms.glowIntensity;\n#else\nfragmentOutputs.color=finalColor*uniforms.glowIntensity;\n#endif\n#ifdef HIGHLIGHT\nfragmentOutputs.color=vec4f(fragmentOutputs.color.rgb,uniforms.glowColor.a);\n#endif\n}\n";a.ShadersStoreWGSL[e]=i;const p={name:e,shader:i};export{p as glowMapGenerationPixelShaderWGSL};
