@crystaldesign/real-time-viewer 25.8.0-beta.19 → 25.8.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/esm/index.js +32 -35
- package/build/types/real-time-viewer/src/controls/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/index.d.ts +1 -1
- package/build/types/real-time-viewer/src/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/lightning/index.d.ts +1 -1
- package/build/types/real-time-viewer/src/lightning/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/parser/shadow/index.d.ts.map +1 -1
- package/build/types/real-time-viewer/src/store/UIStore.d.ts.map +1 -1
- package/build/umd/1309.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1447.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1499.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1781.real-time-viewer.umd.min.js +1 -1
- package/build/umd/1896.real-time-viewer.umd.min.js +2 -0
- package/build/umd/1896.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/1924.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2011.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2439.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2817.real-time-viewer.umd.min.js +1 -1
- package/build/umd/2871.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3116.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3243.real-time-viewer.umd.min.js +2 -0
- package/build/umd/3243.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/3351.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3456.real-time-viewer.umd.min.js +1 -1
- package/build/umd/3945.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4091.real-time-viewer.umd.min.js +1 -1
- package/build/umd/410.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4153.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4248.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4378.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4431.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4542.real-time-viewer.umd.min.js +2 -0
- package/build/umd/4542.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/4602.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4661.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4669.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4711.real-time-viewer.umd.min.js +1 -1
- package/build/umd/4823.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5462.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5478.real-time-viewer.umd.min.js +2 -0
- package/build/umd/5478.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/5483.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5555.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5846.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5860.real-time-viewer.umd.min.js +1 -1
- package/build/umd/5922.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6095.real-time-viewer.umd.min.js +1 -1
- package/build/umd/615.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6230.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6357.real-time-viewer.umd.min.js +1 -1
- package/build/umd/653.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6656.real-time-viewer.umd.min.js +1 -1
- package/build/umd/6829.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7042.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7046.real-time-viewer.umd.min.js +1 -1
- package/build/umd/710.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7142.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7144.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7144.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7229.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7276.real-time-viewer.umd.min.js +2 -0
- package/build/umd/7276.real-time-viewer.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/7352.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7501.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7607.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7729.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7751.real-time-viewer.umd.min.js +1 -1
- package/build/umd/7754.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8078.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8105.real-time-viewer.umd.min.js +1 -1
- package/build/umd/815.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8240.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8333.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8620.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8728.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8729.real-time-viewer.umd.min.js +1 -1
- package/build/umd/8991.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9078.real-time-viewer.umd.min.js +1 -1
- package/build/umd/913.real-time-viewer.umd.min.js +1 -1
- package/build/umd/930.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9383.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9568.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9712.real-time-viewer.umd.min.js +1 -1
- package/build/umd/9884.real-time-viewer.umd.min.js +1 -1
- package/build/umd/real-time-viewer.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +12 -13
- package/build/umd/1020.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1020.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1153.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1153.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1459.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1459.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1605.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1605.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/1887.real-time-viewer.umd.min.js +0 -2
- package/build/umd/1887.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2265.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2265.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2371.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2371.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2517.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2517.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2528.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2528.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2619.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2619.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2668.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2668.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2760.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2760.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2782.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2782.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/2795.real-time-viewer.umd.min.js +0 -2
- package/build/umd/2795.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3040.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3040.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3219.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3219.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3242.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3242.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3296.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3296.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3330.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3330.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3420.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3420.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3436.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3436.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3439.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3439.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3652.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3652.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/377.real-time-viewer.umd.min.js +0 -2
- package/build/umd/377.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3839.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3839.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/3917.real-time-viewer.umd.min.js +0 -2
- package/build/umd/3917.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4049.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4049.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4051.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4051.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4358.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4358.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4478.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4478.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4486.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4486.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4555.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4555.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4560.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4560.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4667.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4667.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4806.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4806.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/4953.real-time-viewer.umd.min.js +0 -2
- package/build/umd/4953.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5197.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5197.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/539.real-time-viewer.umd.min.js +0 -2
- package/build/umd/539.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5477.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5477.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5645.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5645.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5650.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5650.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5779.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5779.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5880.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5880.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/5925.real-time-viewer.umd.min.js +0 -2
- package/build/umd/5925.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6030.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6030.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6126.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6126.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6169.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6169.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6182.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6182.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6288.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6288.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6728.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6728.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6746.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6746.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6748.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6748.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6761.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6761.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/6954.real-time-viewer.umd.min.js +0 -2
- package/build/umd/6954.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7038.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7038.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7069.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7069.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7154.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7154.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7540.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7540.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7615.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7615.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7635.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7635.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7647.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7647.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7664.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7664.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/7736.real-time-viewer.umd.min.js +0 -2
- package/build/umd/7736.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/781.real-time-viewer.umd.min.js +0 -2
- package/build/umd/781.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8180.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8180.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8254.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8254.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8588.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8588.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8627.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8627.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8645.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8645.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/8954.real-time-viewer.umd.min.js +0 -2
- package/build/umd/8954.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9449.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9449.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9487.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9487.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/957.real-time-viewer.umd.min.js +0 -2
- package/build/umd/957.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9646.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9646.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9883.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9883.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/9990.real-time-viewer.umd.min.js +0 -2
- package/build/umd/9990.real-time-viewer.umd.min.js.LICENSE.txt +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 3243.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3243],{1740:(e,n,o)=>{var i=o(7416);o(2889);const r="backgroundUboDeclaration",l="layout(std140,column_major) uniform;uniform Material\n{uniform vec4 vPrimaryColor;uniform vec4 vPrimaryColorShadow;uniform vec2 vDiffuseInfos;uniform vec2 vReflectionInfos;uniform mat4 diffuseMatrix;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;uniform float fFovMultiplier;uniform float pointSize;uniform float shadowLevel;uniform float alpha;uniform vec3 vBackgroundCenter;uniform vec4 vReflectionControl;uniform vec2 projectedGroundInfos;};\n#include<sceneUboDeclaration>\n";i.v.IncludesShadersStore[r]=l},5001:(e,n,o)=>{const i="lightsFragmentFunctions",r="struct lightingInfo\n{vec3 diffuse;\n#ifdef SPECULARTERM\nvec3 specular;\n#endif\n#ifdef NDOTL\nfloat ndl;\n#endif\n};lightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {lightingInfo result;vec3 lightVectorW;float attenuation=1.0;if (lightData.w==0.)\n{vec3 direction=lightData.xyz-vPositionW;attenuation=max(0.,1.0-length(direction)/range);lightVectorW=normalize(direction);}\nelse\n{lightVectorW=normalize(-lightData.xyz);}\nfloat ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\nvec3 angleW=normalize(viewDirectionW+lightVectorW);float specComp=max(0.,dot(vNormal,angleW));specComp=pow(specComp,max(1.,glossiness));result.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;}\nlightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) {lightingInfo result;vec3 direction=lightData.xyz-vPositionW;vec3 lightVectorW=normalize(direction);float attenuation=max(0.,1.0-length(direction)/range);float cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW));if (cosAngle>=lightDirection.w)\n{cosAngle=max(0.,pow(cosAngle,lightData.w));attenuation*=cosAngle;float ndl=max(0.,dot(vNormal,lightVectorW));\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=ndl*diffuseColor*attenuation;\n#ifdef SPECULARTERM\nvec3 angleW=normalize(viewDirectionW+lightVectorW);float specComp=max(0.,dot(vNormal,angleW));specComp=pow(specComp,max(1.,glossiness));result.specular=specComp*specularColor*attenuation;\n#endif\nreturn result;}\nresult.diffuse=vec3(0.);\n#ifdef SPECULARTERM\nresult.specular=vec3(0.);\n#endif\n#ifdef NDOTL\nresult.ndl=0.;\n#endif\nreturn result;}\nlightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) {lightingInfo result;float ndl=dot(vNormal,lightData.xyz)*0.5+0.5;\n#ifdef NDOTL\nresult.ndl=ndl;\n#endif\nresult.diffuse=mix(groundColor,diffuseColor,ndl);\n#ifdef SPECULARTERM\nvec3 angleW=normalize(viewDirectionW+lightData.xyz);float specComp=max(0.,dot(vNormal,angleW));specComp=pow(specComp,max(1.,glossiness));result.specular=specComp*specularColor;\n#endif\nreturn result;}\n#define inline\nvec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix,vec3 posW){vec4 strq=textureProjectionMatrix*vec4(posW,1.0);strq/=strq.w;vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb;return textureColor;}";o(7416).v.IncludesShadersStore[i]=r},3243:(e,n,o)=>{o.r(n),o.d(n,{backgroundPixelShader:()=>f});var i=o(7416);const r="uniform vec4 vEyePosition;uniform vec4 vPrimaryColor;\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\nuniform vec4 vPrimaryColorShadow;\n#endif\nuniform float shadowLevel;uniform float alpha;\n#ifdef DIFFUSE\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;\n#endif\n#if defined(REFLECTIONFRESNEL) || defined(OPACITYFRESNEL)\nuniform vec3 vBackgroundCenter;\n#endif\n#ifdef REFLECTIONFRESNEL\nuniform vec4 vReflectionControl;\n#endif\n#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(REFRACTION)\nuniform mat4 view;\n#endif\n#ifdef PROJECTED_GROUND\nuniform vec2 projectedGroundInfos;\n#endif\n";i.v.IncludesShadersStore.backgroundFragmentDeclaration=r;o(1740),o(5276),o(2628),o(6757),o(8494),o(3323),o(5001),o(198),o(3936),o(9481),o(2397),o(2302),o(5764),o(6012),o(6564),o(5225);const l="backgroundPixelShader",t="#ifdef TEXTURELODSUPPORT\n#extension GL_EXT_shader_texture_lod : enable\n#endif\nprecision highp float;\n#include<__decl__backgroundFragment>\n#include<helperFunctions>\nvarying vec3 vPositionW;\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif \n#ifdef MAINUV2 \nvarying vec2 vMainUV2; \n#endif \n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef DIFFUSE\n#if DIFFUSEDIRECTUV==1\n#define vDiffuseUV vMainUV1\n#elif DIFFUSEDIRECTUV==2\n#define vDiffuseUV vMainUV2\n#else\nvarying vec2 vDiffuseUV;\n#endif\nuniform sampler2D diffuseSampler;\n#endif\n#ifdef REFLECTION\n#ifdef REFLECTIONMAP_3D\n#define sampleReflection(s,c) textureCube(s,c)\nuniform samplerCube reflectionSampler;\n#ifdef TEXTURELODSUPPORT\n#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;uniform samplerCube reflectionSamplerHigh;\n#endif\n#else\n#define sampleReflection(s,c) texture2D(s,c)\nuniform sampler2D reflectionSampler;\n#ifdef TEXTURELODSUPPORT\n#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l)\n#else\nuniform samplerCube reflectionSamplerLow;uniform samplerCube reflectionSamplerHigh;\n#endif\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#else\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#endif\n#include<reflectionFunction>\n#endif\n#ifndef FROMLINEARSPACE\n#define FROMLINEARSPACE;\n#endif\n#ifndef SHADOWONLY\n#define SHADOWONLY;\n#endif\n#include<imageProcessingDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n#include<imageProcessingFunctions>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<logDepthDeclaration>\n#include<clipPlaneFragmentDeclaration>\n#include<fogFragmentDeclaration>\n#ifdef REFLECTIONFRESNEL\n#define FRESNEL_MAXIMUM_ON_ROUGH 0.25\nvec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness)\n{float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness);return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN));}\n#endif\n#ifdef PROJECTED_GROUND\nfloat diskIntersectWithBackFaceCulling(vec3 ro,vec3 rd,vec3 c,float r) {float d=rd.y;if(d>0.0) { return 1e6; }\nvec3 o=ro-c;float t=-o.y/d;vec3 q=o+rd*t;return (dot(q,q)<r*r) ? t : 1e6;}\nfloat sphereIntersect(vec3 ro,vec3 rd,float ra) {float b=dot(ro,rd);float c=dot(ro,ro)-ra*ra;float h=b*b-c;if(h<0.0) { return -1.0; }\nh=sqrt(h);return-b+h;}\nvec3 project(vec3 viewDirectionW,vec3 eyePosition) {float radius=projectedGroundInfos.x;float height=projectedGroundInfos.y;vec3 camDir=-viewDirectionW;float skySphereDistance=sphereIntersect(eyePosition,camDir,radius);vec3 skySpherePositionW=eyePosition+camDir*skySphereDistance;vec3 p=normalize(skySpherePositionW);eyePosition.y-=height;float sIntersection=sphereIntersect(eyePosition,p,radius);vec3 h=vec3(0.0,-height,0.0);float dIntersection=diskIntersectWithBackFaceCulling(eyePosition,p,h,radius);p=(eyePosition+min(sIntersection,dIntersection)*p);return p;}\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(0.0,1.0,0.0);\n#endif\nfloat shadow=1.;float globalShadow=0.;float shadowLightCount=0.;float aggShadow=0.;float numLights=0.;\n#include<lightFragment>[0..maxSimultaneousLights]\n#ifdef SHADOWINUSE\nglobalShadow/=shadowLightCount;\n#else\nglobalShadow=1.0;\n#endif\n#ifndef BACKMAT_SHADOWONLY\nvec4 reflectionColor=vec4(1.,1.,1.,1.);\n#ifdef REFLECTION\n#ifdef PROJECTED_GROUND\nvec3 reflectionVector=project(viewDirectionW,vEyePosition.xyz);reflectionVector=vec3(reflectionMatrix*vec4(reflectionVector,1.));\n#else\nvec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW);\n#endif\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\n#ifdef REFLECTIONMAP_3D\nvec3 reflectionCoords=reflectionVector;\n#else\nvec2 reflectionCoords=reflectionVector.xy;\n#ifdef REFLECTIONMAP_PROJECTION\nreflectionCoords/=reflectionVector.z;\n#endif\nreflectionCoords.y=1.0-reflectionCoords.y;\n#endif\n#ifdef REFLECTIONBLUR\nfloat reflectionLOD=vReflectionInfos.y;\n#ifdef TEXTURELODSUPPORT\nreflectionLOD=reflectionLOD*log2(vReflectionMicrosurfaceInfos.x)*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z;reflectionColor=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD);\n#else\nfloat lodReflectionNormalized=saturate(reflectionLOD);float lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0;vec4 reflectionSpecularMid=sampleReflection(reflectionSampler,reflectionCoords);if(lodReflectionNormalizedDoubled<1.0){reflectionColor=mix(\nsampleReflection(reflectionSamplerHigh,reflectionCoords),\nreflectionSpecularMid,\nlodReflectionNormalizedDoubled\n);} else {reflectionColor=mix(\nreflectionSpecularMid,\nsampleReflection(reflectionSamplerLow,reflectionCoords),\nlodReflectionNormalizedDoubled-1.0\n);}\n#endif\n#else\nvec4 reflectionSample=sampleReflection(reflectionSampler,reflectionCoords);reflectionColor=reflectionSample;\n#endif\n#ifdef RGBDREFLECTION\nreflectionColor.rgb=fromRGBD(reflectionColor);\n#endif\n#ifdef GAMMAREFLECTION\nreflectionColor.rgb=toLinearSpace(reflectionColor.rgb);\n#endif\n#ifdef REFLECTIONBGR\nreflectionColor.rgb=reflectionColor.bgr;\n#endif\nreflectionColor.rgb*=vReflectionInfos.x;\n#endif\nvec3 diffuseColor=vec3(1.,1.,1.);float finalAlpha=alpha;\n#ifdef DIFFUSE\nvec4 diffuseMap=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef GAMMADIFFUSE\ndiffuseMap.rgb=toLinearSpace(diffuseMap.rgb);\n#endif\ndiffuseMap.rgb*=vDiffuseInfos.y;\n#ifdef DIFFUSEHASALPHA\nfinalAlpha*=diffuseMap.a;\n#endif\ndiffuseColor=diffuseMap.rgb;\n#endif\n#ifdef REFLECTIONFRESNEL\nvec3 colorBase=diffuseColor;\n#else\nvec3 colorBase=reflectionColor.rgb*diffuseColor;\n#endif\ncolorBase=max(colorBase,0.0);\n#ifdef USERGBCOLOR\nvec3 finalColor=colorBase;\n#else\n#ifdef USEHIGHLIGHTANDSHADOWCOLORS\nvec3 mainColor=mix(vPrimaryColorShadow.rgb,vPrimaryColor.rgb,colorBase);\n#else\nvec3 mainColor=vPrimaryColor.rgb;\n#endif\nvec3 finalColor=colorBase*mainColor;\n#endif\n#ifdef REFLECTIONFRESNEL\nvec3 reflectionAmount=vReflectionControl.xxx;vec3 reflectionReflectance0=vReflectionControl.yyy;vec3 reflectionReflectance90=vReflectionControl.zzz;float VdotN=dot(normalize(vEyePosition.xyz),normalW);vec3 planarReflectionFresnel=fresnelSchlickEnvironmentGGX(saturate(VdotN),reflectionReflectance0,reflectionReflectance90,1.0);reflectionAmount*=planarReflectionFresnel;\n#ifdef REFLECTIONFALLOFF\nfloat reflectionDistanceFalloff=1.0-saturate(length(vPositionW.xyz-vBackgroundCenter)*vReflectionControl.w);reflectionDistanceFalloff*=reflectionDistanceFalloff;reflectionAmount*=reflectionDistanceFalloff;\n#endif\nfinalColor=mix(finalColor,reflectionColor.rgb,saturate(reflectionAmount));\n#endif\n#ifdef OPACITYFRESNEL\nfloat viewAngleToFloor=dot(normalW,normalize(vEyePosition.xyz-vBackgroundCenter));const float startAngle=0.1;float fadeFactor=saturate(viewAngleToFloor/startAngle);finalAlpha*=fadeFactor*fadeFactor;\n#endif\n#ifdef SHADOWINUSE\nfinalColor=mix(finalColor*shadowLevel,finalColor,globalShadow);\n#endif\nvec4 color=vec4(finalColor,finalAlpha);\n#else\nvec4 color=vec4(vPrimaryColor.rgb,(1.0-clamp(globalShadow,0.,1.))*alpha);\n#endif\n#include<logDepthFragment>\n#include<fogFragment>\n#ifdef IMAGEPROCESSINGPOSTPROCESS\n#if !defined(SKIPFINALCOLORCLAMP)\ncolor.rgb=clamp(color.rgb,0.,30.0);\n#endif\n#else\ncolor=applyImageProcessing(color);\n#endif\n#ifdef PREMULTIPLYALPHA\ncolor.rgb*=color.a;\n#endif\n#ifdef NOISE\ncolor.rgb+=dither(vPositionW.xy,0.5);color=max(color,0.0);\n#endif\ngl_FragColor=color;\n#define CUSTOM_FRAGMENT_MAIN_END\n}\n";i.v.ShadersStore.backgroundPixelShader=t;const f={name:l,shader:t}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:3243 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3351.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3351],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3351],{6782:(e,n,r)=>{const t="kernelBlurVaryingDeclaration",a="varying sampleCoord{X}: vec2f;";r(7416).v.IncludesShadersStoreWGSL[t]=a},3351:(e,n,r)=>{r.r(n),r.d(n,{kernelBlurVertexShaderWGSL:()=>l});var t=r(7416);r(6782);const a="vertexOutputs.sampleCoord{X}=vertexOutputs.sampleCenter+uniforms.delta*KERNEL_OFFSET{X};";t.v.IncludesShadersStoreWGSL.kernelBlurVertex=a;const s="kernelBlurVertexShader",i="attribute position: vec2f;uniform delta: vec2f;varying sampleCenter: vec2f;\n#include<kernelBlurVaryingDeclaration>[0..varyingCount]\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {const madd: vec2f= vec2f(0.5,0.5);\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvertexOutputs.sampleCenter=(input.position*madd+madd);\n#include<kernelBlurVertex>[0..varyingCount]\nvertexOutputs.position= vec4f(input.position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";t.v.ShadersStoreWGSL.kernelBlurVertexShader=i;const l={name:s,shader:i}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3456.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3456],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3456],{3456:(a,e,o)=>{o.r(e),o.d(e,{fxaaPixelShader:()=>t});const l="fxaaPixelShader",n="#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define TEXTUREFUNC(s,c,l) texture2DLodEXT(s,c,l)\n#else\n#define TEXTUREFUNC(s,c,b) texture2D(s,c,b)\n#endif\nuniform sampler2D textureSampler;uniform vec2 texelSize;varying vec2 vUV;varying vec2 sampleCoordS;varying vec2 sampleCoordE;varying vec2 sampleCoordN;varying vec2 sampleCoordW;varying vec2 sampleCoordNW;varying vec2 sampleCoordSE;varying vec2 sampleCoordNE;varying vec2 sampleCoordSW;const float fxaaQualitySubpix=1.0;const float fxaaQualityEdgeThreshold=0.166;const float fxaaQualityEdgeThresholdMin=0.0833;const vec3 kLumaCoefficients=vec3(0.2126,0.7152,0.0722);\n#define FxaaLuma(rgba) dot(rgba.rgb,kLumaCoefficients)\nvoid main(){vec2 posM;posM.x=vUV.x;posM.y=vUV.y;vec4 rgbyM=TEXTUREFUNC(textureSampler,vUV,0.0);float lumaM=FxaaLuma(rgbyM);float lumaS=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordS,0.0));float lumaE=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordE,0.0));float lumaN=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordN,0.0));float lumaW=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordW,0.0));float maxSM=max(lumaS,lumaM);float minSM=min(lumaS,lumaM);float maxESM=max(lumaE,maxSM);float minESM=min(lumaE,minSM);float maxWN=max(lumaN,lumaW);float minWN=min(lumaN,lumaW);float rangeMax=max(maxWN,maxESM);float rangeMin=min(minWN,minESM);float rangeMaxScaled=rangeMax*fxaaQualityEdgeThreshold;float range=rangeMax-rangeMin;float rangeMaxClamped=max(fxaaQualityEdgeThresholdMin,rangeMaxScaled);\n#ifndef MALI\nif(range<rangeMaxClamped) \n{gl_FragColor=rgbyM;return;}\n#endif\nfloat lumaNW=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordNW,0.0));float lumaSE=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordSE,0.0));float lumaNE=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordNE,0.0));float lumaSW=FxaaLuma(TEXTUREFUNC(textureSampler,sampleCoordSW,0.0));float lumaNS=lumaN+lumaS;float lumaWE=lumaW+lumaE;float subpixRcpRange=1.0/range;float subpixNSWE=lumaNS+lumaWE;float edgeHorz1=(-2.0*lumaM)+lumaNS;float edgeVert1=(-2.0*lumaM)+lumaWE;float lumaNESE=lumaNE+lumaSE;float lumaNWNE=lumaNW+lumaNE;float edgeHorz2=(-2.0*lumaE)+lumaNESE;float edgeVert2=(-2.0*lumaN)+lumaNWNE;float lumaNWSW=lumaNW+lumaSW;float lumaSWSE=lumaSW+lumaSE;float edgeHorz4=(abs(edgeHorz1)*2.0)+abs(edgeHorz2);float edgeVert4=(abs(edgeVert1)*2.0)+abs(edgeVert2);float edgeHorz3=(-2.0*lumaW)+lumaNWSW;float edgeVert3=(-2.0*lumaS)+lumaSWSE;float edgeHorz=abs(edgeHorz3)+edgeHorz4;float edgeVert=abs(edgeVert3)+edgeVert4;float subpixNWSWNESE=lumaNWSW+lumaNESE;float lengthSign=texelSize.x;bool horzSpan=edgeHorz>=edgeVert;float subpixA=subpixNSWE*2.0+subpixNWSWNESE;if (!horzSpan)\n{lumaN=lumaW;}\nif (!horzSpan) \n{lumaS=lumaE;}\nif (horzSpan) \n{lengthSign=texelSize.y;}\nfloat subpixB=(subpixA*(1.0/12.0))-lumaM;float gradientN=lumaN-lumaM;float gradientS=lumaS-lumaM;float lumaNN=lumaN+lumaM;float lumaSS=lumaS+lumaM;bool pairN=abs(gradientN)>=abs(gradientS);float gradient=max(abs(gradientN),abs(gradientS));if (pairN)\n{lengthSign=-lengthSign;}\nfloat subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0);vec2 posB;posB.x=posM.x;posB.y=posM.y;vec2 offNP;offNP.x=(!horzSpan) ? 0.0 : texelSize.x;offNP.y=(horzSpan) ? 0.0 : texelSize.y;if (!horzSpan) \n{posB.x+=lengthSign*0.5;}\nif (horzSpan)\n{posB.y+=lengthSign*0.5;}\nvec2 posN;posN.x=posB.x-offNP.x*1.5;posN.y=posB.y-offNP.y*1.5;vec2 posP;posP.x=posB.x+offNP.x*1.5;posP.y=posB.y+offNP.y*1.5;float subpixD=((-2.0)*subpixC)+3.0;float lumaEndN=FxaaLuma(TEXTUREFUNC(textureSampler,posN,0.0));float subpixE=subpixC*subpixC;float lumaEndP=FxaaLuma(TEXTUREFUNC(textureSampler,posP,0.0));if (!pairN) \n{lumaNN=lumaSS;}\nfloat gradientScaled=gradient*1.0/4.0;float lumaMM=lumaM-lumaNN*0.5;float subpixF=subpixD*subpixE;bool lumaMLTZero=lumaMM<0.0;lumaEndN-=lumaNN*0.5;lumaEndP-=lumaNN*0.5;bool doneN=abs(lumaEndN)>=gradientScaled;bool doneP=abs(lumaEndP)>=gradientScaled;if (!doneN) \n{posN.x-=offNP.x*3.0;}\nif (!doneN) \n{posN.y-=offNP.y*3.0;}\nbool doneNP=(!doneN) || (!doneP);if (!doneP) \n{posP.x+=offNP.x*3.0;}\nif (!doneP)\n{posP.y+=offNP.y*3.0;}\nif (doneNP)\n{if (!doneN) lumaEndN=FxaaLuma(TEXTUREFUNC(textureSampler,posN.xy,0.0));if (!doneP) lumaEndP=FxaaLuma(TEXTUREFUNC(textureSampler,posP.xy,0.0));if (!doneN) lumaEndN=lumaEndN-lumaNN*0.5;if (!doneP) lumaEndP=lumaEndP-lumaNN*0.5;doneN=abs(lumaEndN)>=gradientScaled;doneP=abs(lumaEndP)>=gradientScaled;if (!doneN) posN.x-=offNP.x*12.0;if (!doneN) posN.y-=offNP.y*12.0;doneNP=(!doneN) || (!doneP);if (!doneP) posP.x+=offNP.x*12.0;if (!doneP) posP.y+=offNP.y*12.0;}\nfloat dstN=posM.x-posN.x;float dstP=posP.x-posM.x;if (!horzSpan)\n{dstN=posM.y-posN.y;}\nif (!horzSpan) \n{dstP=posP.y-posM.y;}\nbool goodSpanN=(lumaEndN<0.0) != lumaMLTZero;float spanLength=(dstP+dstN);bool goodSpanP=(lumaEndP<0.0) != lumaMLTZero;float spanLengthRcp=1.0/spanLength;bool directionN=dstN<dstP;float dst=min(dstN,dstP);bool goodSpan=directionN ? goodSpanN : goodSpanP;float subpixG=subpixF*subpixF;float pixelOffset=(dst*(-spanLengthRcp))+0.5;float subpixH=subpixG*fxaaQualitySubpix;float pixelOffsetGood=goodSpan ? pixelOffset : 0.0;float pixelOffsetSubpix=max(pixelOffsetGood,subpixH);if (!horzSpan)\n{posM.x+=pixelOffsetSubpix*lengthSign;}\nif (horzSpan)\n{posM.y+=pixelOffsetSubpix*lengthSign;}\n#ifdef MALI\nif(range<rangeMaxClamped) \n{gl_FragColor=rgbyM;}\nelse\n{gl_FragColor=TEXTUREFUNC(textureSampler,posM,0.0);}\n#else\ngl_FragColor=TEXTUREFUNC(textureSampler,posM,0.0);\n#endif\n}";o(7416).v.ShadersStore[l]=n;const t={name:l,shader:n}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 3945.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3945],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[3945],{3945:(e,t,r)=>{r.r(t),r.d(t,{passCubePixelShaderWGSL:()=>n});const a="passCubePixelShader",u="varying var vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_cube<f32>;\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var uv: vec2f=input.vUV*2.0-1.0;\n#ifdef POSITIVEX\nfragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(1.001,uv.y,uv.x));\n#endif\n#ifdef NEGATIVEX\nfragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(-1.001,uv.y,uv.x));\n#endif\n#ifdef POSITIVEY\nfragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv.y,1.001,uv.x));\n#endif\n#ifdef NEGATIVEY\nfragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv.y,-1.001,uv.x));\n#endif\n#ifdef POSITIVEZ\nfragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv,1.001));\n#endif\n#ifdef NEGATIVEZ\nfragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,vec3f(uv,-1.001));\n#endif\n}";r(7416).v.ShadersStoreWGSL[a]=u;const n={name:a,shader:u}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4091.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4091],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4091],{6782:(e,n,r)=>{const t="kernelBlurVaryingDeclaration",a="varying sampleCoord{X}: vec2f;";r(7416).v.IncludesShadersStoreWGSL[t]=a},3284:(e,n,r)=>{const t="packingFunctions",a="fn pack(depth: f32)->vec4f\n{const bit_shift: vec4f= vec4f(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const bit_mask: vec4f= vec4f(0.0,1.0/255.0,1.0/255.0,1.0/255.0);var res: vec4f=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}\nfn unpack(color: vec4f)->f32\n{const bit_shift: vec4f= vec4f(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}";r(7416).v.IncludesShadersStoreWGSL[t]=a},4091:(e,n,r)=>{r.r(n),r.d(n,{kernelBlurPixelShaderWGSL:()=>i});var t=r(7416);r(6782),r(3284);const a="#ifdef DOF\nfactor=sampleCoC(fragmentInputs.sampleCoord{X}); \ncomputedWeight=KERNEL_WEIGHT{X}*factor;sumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCoord{X}))*computedWeight;\n#else\nblend+=textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCoord{X})*computedWeight;\n#endif\n";t.v.IncludesShadersStoreWGSL.kernelBlurFragment=a;const l="#ifdef DOF\nfactor=sampleCoC(fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X});computedWeight=KERNEL_DEP_WEIGHT{X}*factor;sumOfWeights+=computedWeight;\n#else\ncomputedWeight=KERNEL_DEP_WEIGHT{X};\n#endif\n#ifdef PACKEDFLOAT\nblend+=unpack(textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X}))*computedWeight;\n#else\nblend+=textureSample(textureSampler,textureSamplerSampler,fragmentInputs.sampleCenter+uniforms.delta*KERNEL_DEP_OFFSET{X})*computedWeight;\n#endif\n";t.v.IncludesShadersStoreWGSL.kernelBlurFragment2=l;const f="kernelBlurPixelShader",u="var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;uniform delta: vec2f;varying sampleCenter: vec2f;\n#ifdef DOF\nvar circleOfConfusionSamplerSampler: sampler;var circleOfConfusionSampler: texture_2d<f32>;fn sampleCoC(offset: vec2f)->f32 {var coc: f32=textureSample(circleOfConfusionSampler,circleOfConfusionSamplerSampler,offset).r;return coc; }\n#endif\n#include<kernelBlurVaryingDeclaration>[0..varyingCount]\n#ifdef PACKEDFLOAT\n#include<packingFunctions>\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var computedWeight: f32=0.0;\n#ifdef PACKEDFLOAT\nvar blend: f32=0.;\n#else\nvar blend: vec4f= vec4f(0.);\n#endif\n#ifdef DOF\nvar sumOfWeights: f32=CENTER_WEIGHT; \nvar factor: f32=0.0;\n#ifdef PACKEDFLOAT\nblend+=unpack(textureSample(textureSampler,textureSamplerSampler,input.sampleCenter))*CENTER_WEIGHT;\n#else\nblend+=textureSample(textureSampler,textureSamplerSampler,input.sampleCenter)*CENTER_WEIGHT;\n#endif\n#endif\n#include<kernelBlurFragment>[0..varyingCount]\n#include<kernelBlurFragment2>[0..depCount]\n#ifdef PACKEDFLOAT\nfragmentOutputs.color=pack(blend);\n#else\nfragmentOutputs.color=blend;\n#endif\n#ifdef DOF\nfragmentOutputs.color/=sumOfWeights;\n#endif\n}";t.v.ShadersStoreWGSL.kernelBlurPixelShader=u;const i={name:f,shader:u}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 410.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[410],{60410:(e,t,n)=>{n.r(t),n.d(t,{ReadExrDataAsync:()=>ReadExrDataAsync,_ExrTextureLoader:()=>_ExrTextureLoader});var r=n(3146),a=n(61494);const o=65536,s=14,i=65537,l=16384;var c,u;!function(e){e[e.NO_COMPRESSION=0]="NO_COMPRESSION",e[e.RLE_COMPRESSION=1]="RLE_COMPRESSION",e[e.ZIPS_COMPRESSION=2]="ZIPS_COMPRESSION",e[e.ZIP_COMPRESSION=3]="ZIP_COMPRESSION",e[e.PIZ_COMPRESSION=4]="PIZ_COMPRESSION",e[e.PXR24_COMPRESSION=5]="PXR24_COMPRESSION"}(c||(c={})),function(e){e[e.INCREASING_Y=0]="INCREASING_Y",e[e.DECREASING_Y=1]="DECREASING_Y"}(u||(u={}));const f=function GenerateTables(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),a=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(r[e]=0,r[256|e]=32768,a[e]=24,a[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,a[e]=-t-1,a[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,a[e]=13,a[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,a[e]=24,a[256|e]=24):(r[e]=31744,r[256|e]=64512,a[e]=13,a[256|e]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),i=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,o[e]=t|n}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(i[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:a,mantissaTable:o,exponentTable:s,offsetTable:i}}();function ParseNullTerminatedString(e,t){const n=new Uint8Array(e);let r=0;for(;0!=n[t.value+r];)r+=1;const a=(new TextDecoder).decode(n.slice(t.value,t.value+r));return t.value=t.value+r+1,a}function ParseInt32(e,t){const n=e.getInt32(t.value,!0);return t.value+=4,n}function ParseUint32(e,t){const n=e.getUint32(t.value,!0);return t.value+=4,n}function ParseUint8(e,t){const n=e.getUint8(t.value);return t.value+=1,n}function ParseUint16(e,t){const n=e.getUint16(t.value,!0);return t.value+=2,n}function ParseUint8Array(e,t){const n=e[t.value];return t.value+=1,n}function ParseInt64(e,t){let n;return n="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,n}function ParseFloat32(e,t){const n=e.getFloat32(t.value,!0);return t.value+=4,n}function ParseFloat16(e,t){return function DecodeFloat16(e){const t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}(ParseUint16(e,t))}function DecodeFloat32(e,t){return function ToHalfFloat(e){if(Math.abs(e)>65504)throw new Error("Value out of range.Consider using float instead of half-float.");e=(0,a.Clamp)(e,-65504,65504),f.floatView[0]=e;const t=f.uint32View[0],n=t>>23&511;return f.baseTable[n]+((8388607&t)>>f.shiftTable[n])}(ParseFloat32(e,t))}function ParseValue(e,t,n,r){switch(n){case"string":case"stringvector":case"iccProfile":return function ParseFixedLengthString(e,t,n){const r=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}(e.buffer,t,r);case"chlist":return function ParseChlist(e,t,n){const r=t.value,a=[];for(;t.value<r+n-1;){const n=ParseNullTerminatedString(e.buffer,t),r=ParseInt32(e,t),o=ParseUint8(e,t);t.value+=3;const s=ParseInt32(e,t),i=ParseInt32(e,t);a.push({name:n,pixelType:r,pLinear:o,xSampling:s,ySampling:i})}return t.value+=1,a}(e,t,r);case"chromaticities":return function ParseChromaticities(e,t){return{redX:ParseFloat32(e,t),redY:ParseFloat32(e,t),greenX:ParseFloat32(e,t),greenY:ParseFloat32(e,t),blueX:ParseFloat32(e,t),blueY:ParseFloat32(e,t),whiteX:ParseFloat32(e,t),whiteY:ParseFloat32(e,t)}}(e,t);case"compression":return function ParseCompression(e,t){return ParseUint8(e,t)}(e,t);case"box2i":return function ParseBox2i(e,t){return{xMin:ParseInt32(e,t),yMin:ParseInt32(e,t),xMax:ParseInt32(e,t),yMax:ParseInt32(e,t)}}(e,t);case"lineOrder":return function ParseLineOrder(e,t){const n=ParseUint8(e,t);return u[n]}(e,t);case"float":return ParseFloat32(e,t);case"v2f":return function ParseV2f(e,t){return[ParseFloat32(e,t),ParseFloat32(e,t)]}(e,t);case"v3f":return function ParseV3f(e,t){return[ParseFloat32(e,t),ParseFloat32(e,t),ParseFloat32(e,t)]}(e,t);case"int":return ParseInt32(e,t);case"rational":return function ParseRational(e,t){return[ParseInt32(e,t),ParseUint32(e,t)]}(e,t);case"timecode":return function ParseTimecode(e,t){return[ParseUint32(e,t),ParseUint32(e,t)]}(e,t);case"preview":return t.value+=r,"skipped";default:return void(t.value+=r)}}function Predictor(e){for(let t=1;t<e.length;t++){const n=e[t-1]+e[t]-128;e[t]=n}}function InterleaveScalar(e,t){let n=0,r=Math.floor((e.length+1)/2),a=0;const o=e.length-1;for(;!(a>o||(t[a++]=e[n++],a>o));)t[a++]=e[r++]}function GetExrHeader(e,t){if(20000630!=e.getUint32(0,!0))throw new Error("Incorrect OpenEXR format");const n=e.getUint8(4),a=e.getUint8(5),o={singleTile:!!(2&a),longName:!!(4&a),deepFormat:!!(8&a),multiPart:!!(16&a)};t.value=8;const s={};let i=!0;for(;i;){const n=ParseNullTerminatedString(e.buffer,t);if(n){const a=ParseNullTerminatedString(e.buffer,t),o=ParseValue(e,t,a,ParseUint32(e,t));void 0===o?r.Y.Warn(`Unknown header attribute type ${a}'.`):s[n]=o}else i=!1}if(0!=(-5&a))throw new Error("Unsupported file format");return{version:n,spec:o,...s}}function GetBits(e,t,n,r,a){for(;n<e;)t=t<<8|ParseUint8Array(r,a),n+=8;return{l:t>>(n-=e)&(1<<e)-1,c:t,lc:n}}function GetChar(e,t,n,r){return{c:e=e<<8|ParseUint8Array(n,r),lc:t+=8}}function GetCode(e,t,n,r,a,o,s,i,l){if(e==t){if(r<8){const e=GetChar(n,r,a,o);n=e.c,r=e.lc}let e=n>>(r-=8);if(e=new Uint8Array([e])[0],i.value+e>l)return null;const t=s[i.value-1];for(;e-- >0;)s[i.value++]=t}else{if(!(i.value<l))return null;s[i.value++]=e}return{c:n,lc:r}}const d=new Array(59);function HufUnpackEncTable(e,t,n,r,a,o){const s=t;let l=0,c=0;for(;r<=a;r++){if(s.value-t.value>n)return;let i=GetBits(6,l,c,e,s);const u=i.l;if(l=i.c,c=i.lc,o[r]=u,63==u){if(s.value-t.value>n)throw new Error("Error in HufUnpackEncTable");i=GetBits(8,l,c,e,s);let u=i.l+6;if(l=i.c,c=i.lc,r+u>a+1)throw new Error("Error in HufUnpackEncTable");for(;u--;)o[r++]=0;r--}else if(u>=59){let e=u-59+2;if(r+e>a+1)throw new Error("Error in HufUnpackEncTable");for(;e--;)o[r++]=0;r--}}!function HufCanonicalCodeTable(e){for(let e=0;e<=58;++e)d[e]=0;for(let t=0;t<i;++t)d[e[t]]+=1;let t=0;for(let e=58;e>0;--e){const n=t+d[e]>>1;d[e]=t,t=n}for(let t=0;t<i;++t){const n=e[t];n>0&&(e[t]=n|d[n]++<<6)}}(o)}function HufLength(e){return 63&e}function HufCode(e){return e>>6}function HufUncompress(e,t,n,r,a,o){const c=n.value,u=ParseUint32(t,n),f=ParseUint32(t,n);n.value+=4;const d=ParseUint32(t,n);if(n.value+=4,u<0||u>=i||f<0||f>=i)throw new Error("Wrong HUF_ENCSIZE");const h=new Array(i),w=new Array(l);!function HufClearDecTable(e){for(let t=0;t<l;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}(w);if(HufUnpackEncTable(e,n,r-(n.value-c),u,f,h),d>8*(r-(n.value-c)))throw new Error("Wrong hufUncompress");!function HufBuildDecTable(e,t,n,r){for(;t<=n;t++){const n=HufCode(e[t]),a=HufLength(e[t]);if(n>>a)throw new Error("Invalid table entry");if(a>s){const e=r[n>>a-s];if(e.len)throw new Error("Invalid table entry");if(e.lit++,e.p){const t=e.p;e.p=new Array(e.lit);for(let n=0;n<e.lit-1;++n)e.p[n]=t[n]}else e.p=new Array(1);e.p[e.lit-1]=t}else if(a){let e=0;for(let o=1<<s-a;o>0;o--){const o=r[(n<<s-a)+e];if(o.len||o.p)throw new Error("Invalid table entry");o.len=a,o.lit=t,e++}}}return!0}(h,u,f,w),function HufDecode(e,t,n,r,a,o,i,l,c){let u=0,f=0;const d=i,h=Math.trunc(r.value+(a+7)/8);for(;r.value<h;){let a=GetChar(u,f,n,r);for(u=a.c,f=a.lc;f>=s;){const i=t[u>>f-s&16383];if(i.len){f-=i.len;const e=GetCode(i.lit,o,u,f,n,r,l,c,d);e&&(u=e.c,f=e.lc)}else{if(!i.p)throw new Error("hufDecode issues");let t;for(t=0;t<i.lit;t++){const s=HufLength(e[i.p[t]]);for(;f<s&&r.value<h;)a=GetChar(u,f,n,r),u=a.c,f=a.lc;if(f>=s&&HufCode(e[i.p[t]])==(u>>f-s&(1<<s)-1)){f-=s;const e=GetCode(i.p[t],o,u,f,n,r,l,c,d);e&&(u=e.c,f=e.lc);break}}if(t==i.lit)throw new Error("HufDecode issues")}}}const w=8-a&7;for(u>>=w,f-=w;f>0;){const e=t[u<<s-f&16383];if(!e.len)throw new Error("HufDecode issues");{f-=e.len;const t=GetCode(e.lit,o,u,f,n,r,l,c,d);t&&(u=t.c,f=t.lc)}}return!0}(h,w,e,n,d,f,o,a,{value:0})}function UInt16(e){return 65535&e}function Int16(e){const t=UInt16(e);return t>32767?t-65536:t}function Wdec14(e,t){const n=Int16(e),r=Int16(t),a=n+(1&r)+(r>>1);return{a,b:a-r}}function Wdec16(e,t){const n=UInt16(e),r=UInt16(t),a=n-(r>>1)&65535;return{a:r+a-32768&65535,b:a}}function Wav2Decode(e,t,n,r,a,o,s){const i=s<16384,l=n>a?a:n;let c,u,f=1;for(;f<=l;)f<<=1;for(f>>=1,c=f,f>>=1;f>=1;){u=0;const s=u+o*(a-c),l=o*f,d=o*c,h=r*f,w=r*c;let p,y,P,b;for(;u<=s;u+=d){let a=u;const o=u+r*(n-c);for(;a<=o;a+=w){const n=a+h,r=a+l,o=r+h;if(i){let s=Wdec14(e[a+t],e[r+t]);p=s.a,P=s.b,s=Wdec14(e[n+t],e[o+t]),y=s.a,b=s.b,s=Wdec14(p,y),e[a+t]=s.a,e[n+t]=s.b,s=Wdec14(P,b),e[r+t]=s.a,e[o+t]=s.b}else{let s=Wdec16(e[a+t],e[r+t]);p=s.a,P=s.b,s=Wdec16(e[n+t],e[o+t]),y=s.a,b=s.b,s=Wdec16(p,y),e[a+t]=s.a,e[n+t]=s.b,s=Wdec16(P,b),e[r+t]=s.a,e[o+t]=s.b}}if(n&f){const n=a+l;let r;r=i?Wdec14(e[a+t],e[n+t]):Wdec16(e[a+t],e[n+t]),p=r.a,e[n+t]=r.b,e[a+t]=p}}if(a&f){let a=u;const o=u+r*(n-c);for(;a<=o;a+=w){const n=a+h;let r;r=i?Wdec14(e[a+t],e[n+t]):Wdec16(e[a+t],e[n+t]),p=r.a,e[n+t]=r.b,e[a+t]=p}}c=f,f>>=1}return u}function UncompressRAW(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function UncompressRLE(e){const t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(function DecodeRunLength(e){let t=e.byteLength;const n=[];let r=0;const a=new DataView(e);for(;t>0;){const e=a.getInt8(r++);if(e<0){const o=-e;t-=o+1;for(let e=0;e<o;e++)n.push(a.getUint8(r++))}else{const o=e;t-=2;const s=a.getUint8(r++);for(let e=0;e<o+1;e++)n.push(s)}}return n}(t)),r=new Uint8Array(n.length);return Predictor(n),InterleaveScalar(n,r),new DataView(r.buffer)}function UncompressZIP(e){const t=e.array.slice(e.offset.value,e.offset.value+e.size),n=fflate.unzlibSync(t),r=new Uint8Array(n.length);return Predictor(n),InterleaveScalar(n,r),new DataView(r.buffer)}function UncompressPXR(e){const t=e.array.slice(e.offset.value,e.offset.value+e.size),n=fflate.unzlibSync(t),r=e.lines*e.channels*e.width,a=1==e.type?new Uint16Array(r):new Uint32Array(r);let o=0,s=0;const i=new Array(4);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){let t=0;switch(e.type){case 1:i[0]=o,i[1]=i[0]+e.width,o=i[1]+e.width;for(let r=0;r<e.width;++r){t+=n[i[0]++]<<8|n[i[1]++],a[s]=t,s++}break;case 2:i[0]=o,i[1]=i[0]+e.width,i[2]=i[1]+e.width,o=i[2]+e.width;for(let r=0;r<e.width;++r){t+=n[i[0]++]<<24|n[i[1]++]<<16|n[i[2]++]<<8,a[s]=t,s++}}}return new DataView(a.buffer)}function UncompressPIZ(e){const t=e.viewer,n={value:e.offset.value},r=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),a=new Uint8Array(8192);let s=0;const i=new Array(e.channels);for(let t=0;t<e.channels;t++)i[t]={},i[t].start=s,i[t].end=i[t].start,i[t].nx=e.width,i[t].ny=e.lines,i[t].size=e.type,s+=i[t].nx*i[t].ny*i[t].size;const l=ParseUint16(t,n),c=ParseUint16(t,n);if(c>=8192)throw new Error("Wrong PIZ_COMPRESSION BITMAP_SIZE");if(l<=c)for(let e=0;e<c-l+1;e++)a[e+l]=ParseUint8(t,n);const u=new Uint16Array(o),f=function ReverseLutFromBitmap(e,t){let n=0;for(let r=0;r<o;++r)(0==r||e[r>>3]&1<<(7&r))&&(t[n++]=r);const r=n-1;for(;n<o;)t[n++]=0;return r}(a,u),d=ParseUint32(t,n);HufUncompress(e.array,t,n,d,r,s);for(let t=0;t<e.channels;++t){const e=i[t];for(let n=0;n<i[t].size;++n)Wav2Decode(r,e.start+n,e.nx,e.size,e.ny,e.nx*e.size,f)}!function ApplyLut(e,t,n){for(let r=0;r<n;++r)t[r]=e[t[r]]}(u,r,s);let h=0;const w=new Uint8Array(r.buffer.byteLength);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){const e=i[t],n=e.nx*e.size,a=new Uint8Array(r.buffer,2*e.end,2*n);w.set(a,h),h+=2*n,e.end+=n}return new DataView(w.buffer)}var h,w=n(88741);!function(e){e[e.Float=0]="Float",e[e.HalfFloat=1]="HalfFloat"}(h||(h={}));class ExrLoaderGlobalConfiguration{}async function CreateDecoderAsync(e,t,n,r){const a={size:0,viewer:t,array:new Uint8Array(t.buffer),offset:n,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,channelLineOffsets:{},scanOrder:()=>0,bytesPerLine:0,outLineWidth:0,lines:0,scanlineBlockSize:0,inputSize:null,type:0,uncompress:null,getter:()=>0,format:5,outputChannels:0,decodeChannels:{},blockCount:null,byteArray:null,linearSpace:!1,textureType:0};switch(e.compression){case c.NO_COMPRESSION:a.lines=1,a.uncompress=UncompressRAW;break;case c.RLE_COMPRESSION:a.lines=1,a.uncompress=UncompressRLE;break;case c.ZIPS_COMPRESSION:a.lines=1,a.uncompress=UncompressZIP,await w.w1.LoadScriptAsync(ExrLoaderGlobalConfiguration.FFLATEUrl);break;case c.ZIP_COMPRESSION:a.lines=16,a.uncompress=UncompressZIP,await w.w1.LoadScriptAsync(ExrLoaderGlobalConfiguration.FFLATEUrl);break;case c.PIZ_COMPRESSION:a.lines=32,a.uncompress=UncompressPIZ;break;case c.PXR24_COMPRESSION:a.lines=16,a.uncompress=UncompressPXR,await w.w1.LoadScriptAsync(ExrLoaderGlobalConfiguration.FFLATEUrl);break;default:throw new Error(c[e.compression]+" is unsupported")}a.scanlineBlockSize=a.lines;const o={};for(const t of e.channels)switch(t.name){case"R":case"G":case"B":case"A":case"Y":o[t.name]=!0,a.type=t.pixelType}let s=!1;if(o.R&&o.G&&o.B&&o.A)a.outputChannels=4,a.decodeChannels={R:0,G:1,B:2,A:3};else if(o.R&&o.G&&o.B)s=!0,a.outputChannels=4,a.decodeChannels={R:0,G:1,B:2,A:3};else if(o.R&&o.G)a.outputChannels=2,a.decodeChannels={R:0,G:1};else if(o.R)a.outputChannels=1,a.decodeChannels={R:0};else{if(!o.Y)throw new Error("EXRLoader.parse: file contains unsupported data channels.");a.outputChannels=1,a.decodeChannels={Y:0}}if(1===a.type)switch(r){case h.Float:a.getter=ParseFloat16,a.inputSize=2;break;case h.HalfFloat:a.getter=ParseUint16,a.inputSize=2}else{if(2!==a.type)throw new Error("Unsupported pixelType "+a.type+" for "+e.compression);switch(r){case h.Float:a.getter=ParseFloat32,a.inputSize=4;break;case h.HalfFloat:a.getter=DecodeFloat32,a.inputSize=4}}a.blockCount=a.height/a.scanlineBlockSize;for(let e=0;e<a.blockCount;e++)ParseInt64(t,n);const i=a.width*a.height*a.outputChannels;switch(r){case h.Float:a.byteArray=new Float32Array(i),a.textureType=1,s&&a.byteArray.fill(1,0,i);break;case h.HalfFloat:a.byteArray=new Uint16Array(i),a.textureType=2,s&&a.byteArray.fill(15360,0,i);break;default:throw new Error("Unsupported type: "+r)}let l=0;for(const t of e.channels)void 0!==a.decodeChannels[t.name]&&(a.channelLineOffsets[t.name]=l*a.width),l+=2*t.pixelType;return a.bytesPerLine=a.width*l,a.outLineWidth=a.width*a.outputChannels,"INCREASING_Y"===e.lineOrder?a.scanOrder=e=>e:a.scanOrder=e=>a.height-1-e,4==a.outputChannels?(a.format=5,a.linearSpace=!0):(a.format=6,a.linearSpace=!1),a}function ScanData(e,t,n,r){const a={value:0};for(let o=0;o<e.height/e.scanlineBlockSize;o++){const s=ParseInt32(n,r)-t.dataWindow.yMin;e.size=ParseUint32(n,r),e.lines=s+e.scanlineBlockSize>e.height?e.height-s:e.scanlineBlockSize;const i=e.size<e.lines*e.bytesPerLine&&e.uncompress?e.uncompress(e):UncompressRAW(e);r.value+=e.size;for(let n=0;n<e.scanlineBlockSize;n++){const r=o*e.scanlineBlockSize,s=n+e.scanOrder(r);if(s>=e.height)continue;const l=n*e.bytesPerLine,c=(e.height-1-s)*e.outLineWidth;for(let n=0;n<e.channels;n++){const r=t.channels[n].name,o=e.channelLineOffsets[r],s=e.decodeChannels[r];if(void 0!==s){a.value=l+o;for(let t=0;t<e.width;t++){const n=c+t*e.outputChannels+s;e.byteArray&&(e.byteArray[n]=e.getter(i,a))}}}}}}ExrLoaderGlobalConfiguration.DefaultOutputType=h.HalfFloat,ExrLoaderGlobalConfiguration.FFLATEUrl="https://unpkg.com/fflate@0.8.2";class _ExrTextureLoader{constructor(){this.supportCascades=!1}loadCubeData(e,t,n,r,a){throw".exr not supported in Cube."}loadData(e,t,n){const a=new DataView(e.buffer),o={value:0},s=GetExrHeader(a,o);CreateDecoderAsync(s,a,o,ExrLoaderGlobalConfiguration.DefaultOutputType).then((e=>{ScanData(e,s,a,o);const r=s.dataWindow.xMax-s.dataWindow.xMin+1,i=s.dataWindow.yMax-s.dataWindow.yMin+1;n(r,i,t.generateMipMaps,!1,(()=>{const n=t.getEngine();t.format=s.format,t.type=e.textureType,t.invertY=!1,t._gammaSpace=!s.linearSpace,e.byteArray&&n._uploadDataToTextureDirectly(t,e.byteArray,0,0,void 0,!0)}))})).catch((e=>{r.Y.Error("Failed to load EXR texture: ",e)}))}}async function ReadExrDataAsync(e){const t=new DataView(e),n={value:0},a=GetExrHeader(t,n);try{const e=await CreateDecoderAsync(a,t,n,h.Float);return ScanData(e,a,t,n),e.byteArray?{width:a.dataWindow.xMax-a.dataWindow.xMin+1,height:a.dataWindow.yMax-a.dataWindow.yMin+1,data:new Float32Array(e.byteArray)}:(r.Y.Error("Failed to decode EXR data: No byte array available."),{width:0,height:0,data:null})}catch(e){r.Y.Error("Failed to load EXR data: ",e)}return{width:0,height:0,data:null}}}}]);
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[410],{410:(e,t,n)=>{n.r(t),n.d(t,{_ExrTextureLoader:()=>_ExrTextureLoader});var r=n(3146),a=n(1494);const o=65536,s=14,i=65537,l=16384;var c,u;!function(e){e[e.NO_COMPRESSION=0]="NO_COMPRESSION",e[e.RLE_COMPRESSION=1]="RLE_COMPRESSION",e[e.ZIPS_COMPRESSION=2]="ZIPS_COMPRESSION",e[e.ZIP_COMPRESSION=3]="ZIP_COMPRESSION",e[e.PIZ_COMPRESSION=4]="PIZ_COMPRESSION",e[e.PXR24_COMPRESSION=5]="PXR24_COMPRESSION"}(c||(c={})),function(e){e[e.INCREASING_Y=0]="INCREASING_Y",e[e.DECREASING_Y=1]="DECREASING_Y"}(u||(u={}));const f=function _GenerateTables(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),a=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(r[e]=0,r[256|e]=32768,a[e]=24,a[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,a[e]=-t-1,a[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,a[e]=13,a[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,a[e]=24,a[256|e]=24):(r[e]=31744,r[256|e]=64512,a[e]=13,a[256|e]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),i=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,o[e]=t|n}for(let e=1024;e<2048;++e)o[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(i[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:a,mantissaTable:o,exponentTable:s,offsetTable:i}}();function ParseNullTerminatedString(e,t){const n=new Uint8Array(e);let r=0;for(;0!=n[t.value+r];)r+=1;const a=(new TextDecoder).decode(n.slice(t.value,t.value+r));return t.value=t.value+r+1,a}function ParseInt32(e,t){const n=e.getInt32(t.value,!0);return t.value+=4,n}function ParseUint32(e,t){const n=e.getUint32(t.value,!0);return t.value+=4,n}function ParseUint8(e,t){const n=e.getUint8(t.value);return t.value+=1,n}function ParseUint16(e,t){const n=e.getUint16(t.value,!0);return t.value+=2,n}function ParseUint8Array(e,t){const n=e[t.value];return t.value+=1,n}function ParseInt64(e,t){let n;return n="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,n}function ParseFloat32(e,t){const n=e.getFloat32(t.value,!0);return t.value+=4,n}function ParseFloat16(e,t){return function DecodeFloat16(e){const t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}(ParseUint16(e,t))}function DecodeFloat32(e,t){return function ToHalfFloat(e){if(Math.abs(e)>65504)throw new Error("Value out of range.Consider using float instead of half-float.");e=(0,a.Clamp)(e,-65504,65504),f.floatView[0]=e;const t=f.uint32View[0],n=t>>23&511;return f.baseTable[n]+((8388607&t)>>f.shiftTable[n])}(ParseFloat32(e,t))}function ParseValue(e,t,n,r){switch(n){case"string":case"stringvector":case"iccProfile":return function ParseFixedLengthString(e,t,n){const r=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}(e.buffer,t,r);case"chlist":return function ParseChlist(e,t,n){const r=t.value,a=[];for(;t.value<r+n-1;){const n=ParseNullTerminatedString(e.buffer,t),r=ParseInt32(e,t),o=ParseUint8(e,t);t.value+=3;const s=ParseInt32(e,t),i=ParseInt32(e,t);a.push({name:n,pixelType:r,pLinear:o,xSampling:s,ySampling:i})}return t.value+=1,a}(e,t,r);case"chromaticities":return function ParseChromaticities(e,t){return{redX:ParseFloat32(e,t),redY:ParseFloat32(e,t),greenX:ParseFloat32(e,t),greenY:ParseFloat32(e,t),blueX:ParseFloat32(e,t),blueY:ParseFloat32(e,t),whiteX:ParseFloat32(e,t),whiteY:ParseFloat32(e,t)}}(e,t);case"compression":return function ParseCompression(e,t){return ParseUint8(e,t)}(e,t);case"box2i":return function ParseBox2i(e,t){return{xMin:ParseInt32(e,t),yMin:ParseInt32(e,t),xMax:ParseInt32(e,t),yMax:ParseInt32(e,t)}}(e,t);case"lineOrder":return function ParseLineOrder(e,t){const n=ParseUint8(e,t);return u[n]}(e,t);case"float":return ParseFloat32(e,t);case"v2f":return function ParseV2f(e,t){return[ParseFloat32(e,t),ParseFloat32(e,t)]}(e,t);case"v3f":return function ParseV3f(e,t){return[ParseFloat32(e,t),ParseFloat32(e,t),ParseFloat32(e,t)]}(e,t);case"int":return ParseInt32(e,t);case"rational":return function ParseRational(e,t){return[ParseInt32(e,t),ParseUint32(e,t)]}(e,t);case"timecode":return function ParseTimecode(e,t){return[ParseUint32(e,t),ParseUint32(e,t)]}(e,t);case"preview":return t.value+=r,"skipped";default:return void(t.value+=r)}}function Predictor(e){for(let t=1;t<e.length;t++){const n=e[t-1]+e[t]-128;e[t]=n}}function InterleaveScalar(e,t){let n=0,r=Math.floor((e.length+1)/2),a=0;const o=e.length-1;for(;!(a>o||(t[a++]=e[n++],a>o));)t[a++]=e[r++]}function GetBits(e,t,n,r,a){for(;n<e;)t=t<<8|ParseUint8Array(r,a),n+=8;return{l:t>>(n-=e)&(1<<e)-1,c:t,lc:n}}function GetChar(e,t,n,r){return{c:e=e<<8|ParseUint8Array(n,r),lc:t+=8}}function GetCode(e,t,n,r,a,o,s,i,l){if(e==t){if(r<8){const e=GetChar(n,r,a,o);n=e.c,r=e.lc}let e=n>>(r-=8);if(e=new Uint8Array([e])[0],i.value+e>l)return null;const t=s[i.value-1];for(;e-- >0;)s[i.value++]=t}else{if(!(i.value<l))return null;s[i.value++]=e}return{c:n,lc:r}}const d=new Array(59);function HufUnpackEncTable(e,t,n,r,a,o){const s=t;let l=0,c=0;for(;r<=a;r++){if(s.value-t.value>n)return;let i=GetBits(6,l,c,e,s);const u=i.l;if(l=i.c,c=i.lc,o[r]=u,63==u){if(s.value-t.value>n)throw new Error("Error in HufUnpackEncTable");i=GetBits(8,l,c,e,s);let u=i.l+6;if(l=i.c,c=i.lc,r+u>a+1)throw new Error("Error in HufUnpackEncTable");for(;u--;)o[r++]=0;r--}else if(u>=59){let e=u-59+2;if(r+e>a+1)throw new Error("Error in HufUnpackEncTable");for(;e--;)o[r++]=0;r--}}!function HufCanonicalCodeTable(e){for(let e=0;e<=58;++e)d[e]=0;for(let t=0;t<i;++t)d[e[t]]+=1;let t=0;for(let e=58;e>0;--e){const n=t+d[e]>>1;d[e]=t,t=n}for(let t=0;t<i;++t){const n=e[t];n>0&&(e[t]=n|d[n]++<<6)}}(o)}function HufLength(e){return 63&e}function HufCode(e){return e>>6}function HufUncompress(e,t,n,r,a,o){const c=n.value,u=ParseUint32(t,n),f=ParseUint32(t,n);n.value+=4;const d=ParseUint32(t,n);if(n.value+=4,u<0||u>=i||f<0||f>=i)throw new Error("Wrong HUF_ENCSIZE");const w=new Array(i),p=new Array(l);!function HufClearDecTable(e){for(let t=0;t<l;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}(p);if(HufUnpackEncTable(e,n,r-(n.value-c),u,f,w),d>8*(r-(n.value-c)))throw new Error("Wrong hufUncompress");!function HufBuildDecTable(e,t,n,r){for(;t<=n;t++){const n=HufCode(e[t]),a=HufLength(e[t]);if(n>>a)throw new Error("Invalid table entry");if(a>s){const e=r[n>>a-s];if(e.len)throw new Error("Invalid table entry");if(e.lit++,e.p){const t=e.p;e.p=new Array(e.lit);for(let n=0;n<e.lit-1;++n)e.p[n]=t[n]}else e.p=new Array(1);e.p[e.lit-1]=t}else if(a){let e=0;for(let o=1<<s-a;o>0;o--){const o=r[(n<<s-a)+e];if(o.len||o.p)throw new Error("Invalid table entry");o.len=a,o.lit=t,e++}}}return!0}(w,u,f,p),function HufDecode(e,t,n,r,a,o,i,l,c){let u=0,f=0;const d=i,w=Math.trunc(r.value+(a+7)/8);for(;r.value<w;){let a=GetChar(u,f,n,r);for(u=a.c,f=a.lc;f>=s;){const i=t[u>>f-s&16383];if(i.len){f-=i.len;const e=GetCode(i.lit,o,u,f,n,r,l,c,d);e&&(u=e.c,f=e.lc)}else{if(!i.p)throw new Error("hufDecode issues");let t;for(t=0;t<i.lit;t++){const s=HufLength(e[i.p[t]]);for(;f<s&&r.value<w;)a=GetChar(u,f,n,r),u=a.c,f=a.lc;if(f>=s&&HufCode(e[i.p[t]])==(u>>f-s&(1<<s)-1)){f-=s;const e=GetCode(i.p[t],o,u,f,n,r,l,c,d);e&&(u=e.c,f=e.lc);break}}if(t==i.lit)throw new Error("HufDecode issues")}}}const p=8-a&7;for(u>>=p,f-=p;f>0;){const e=t[u<<s-f&16383];if(!e.len)throw new Error("HufDecode issues");{f-=e.len;const t=GetCode(e.lit,o,u,f,n,r,l,c,d);t&&(u=t.c,f=t.lc)}}return!0}(w,p,e,n,d,f,o,a,{value:0})}function UInt16(e){return 65535&e}function Int16(e){const t=UInt16(e);return t>32767?t-65536:t}function Wdec14(e,t){const n=Int16(e),r=Int16(t),a=n+(1&r)+(r>>1);return{a,b:a-r}}function Wdec16(e,t){const n=UInt16(e),r=UInt16(t),a=n-(r>>1)&65535;return{a:r+a-32768&65535,b:a}}function Wav2Decode(e,t,n,r,a,o,s){const i=s<16384,l=n>a?a:n;let c,u,f=1;for(;f<=l;)f<<=1;for(f>>=1,c=f,f>>=1;f>=1;){u=0;const s=u+o*(a-c),l=o*f,d=o*c,w=r*f,p=r*c;let h,P,y,b;for(;u<=s;u+=d){let a=u;const o=u+r*(n-c);for(;a<=o;a+=p){const n=a+w,r=a+l,o=r+w;if(i){let s=Wdec14(e[a+t],e[r+t]);h=s.a,y=s.b,s=Wdec14(e[n+t],e[o+t]),P=s.a,b=s.b,s=Wdec14(h,P),e[a+t]=s.a,e[n+t]=s.b,s=Wdec14(y,b),e[r+t]=s.a,e[o+t]=s.b}else{let s=Wdec16(e[a+t],e[r+t]);h=s.a,y=s.b,s=Wdec16(e[n+t],e[o+t]),P=s.a,b=s.b,s=Wdec16(h,P),e[a+t]=s.a,e[n+t]=s.b,s=Wdec16(y,b),e[r+t]=s.a,e[o+t]=s.b}}if(n&f){const n=a+l;let r;r=i?Wdec14(e[a+t],e[n+t]):Wdec16(e[a+t],e[n+t]),h=r.a,e[n+t]=r.b,e[a+t]=h}}if(a&f){let a=u;const o=u+r*(n-c);for(;a<=o;a+=p){const n=a+w;let r;r=i?Wdec14(e[a+t],e[n+t]):Wdec16(e[a+t],e[n+t]),h=r.a,e[n+t]=r.b,e[a+t]=h}}c=f,f>>=1}return u}function UncompressRAW(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function UncompressRLE(e){const t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(function DecodeRunLength(e){let t=e.byteLength;const n=new Array;let r=0;const a=new DataView(e);for(;t>0;){const e=a.getInt8(r++);if(e<0){const o=-e;t-=o+1;for(let e=0;e<o;e++)n.push(a.getUint8(r++))}else{const o=e;t-=2;const s=a.getUint8(r++);for(let e=0;e<o+1;e++)n.push(s)}}return n}(t)),r=new Uint8Array(n.length);return Predictor(n),InterleaveScalar(n,r),new DataView(r.buffer)}function UncompressZIP(e){const t=e.array.slice(e.offset.value,e.offset.value+e.size),n=fflate.unzlibSync(t),r=new Uint8Array(n.length);return Predictor(n),InterleaveScalar(n,r),new DataView(r.buffer)}function UncompressPXR(e){const t=e.array.slice(e.offset.value,e.offset.value+e.size),n=fflate.unzlibSync(t),r=e.lines*e.channels*e.width,a=1==e.type?new Uint16Array(r):new Uint32Array(r);let o=0,s=0;const i=new Array(4);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){let t=0;switch(e.type){case 1:i[0]=o,i[1]=i[0]+e.width,o=i[1]+e.width;for(let r=0;r<e.width;++r){t+=n[i[0]++]<<8|n[i[1]++],a[s]=t,s++}break;case 2:i[0]=o,i[1]=i[0]+e.width,i[2]=i[1]+e.width,o=i[2]+e.width;for(let r=0;r<e.width;++r){t+=n[i[0]++]<<24|n[i[1]++]<<16|n[i[2]++]<<8,a[s]=t,s++}}}return new DataView(a.buffer)}function UncompressPIZ(e){const t=e.viewer,n={value:e.offset.value},r=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),a=new Uint8Array(8192);let s=0;const i=new Array(e.channels);for(let t=0;t<e.channels;t++)i[t]={},i[t].start=s,i[t].end=i[t].start,i[t].nx=e.width,i[t].ny=e.lines,i[t].size=e.type,s+=i[t].nx*i[t].ny*i[t].size;const l=ParseUint16(t,n),c=ParseUint16(t,n);if(c>=8192)throw new Error("Wrong PIZ_COMPRESSION BITMAP_SIZE");if(l<=c)for(let e=0;e<c-l+1;e++)a[e+l]=ParseUint8(t,n);const u=new Uint16Array(o),f=function ReverseLutFromBitmap(e,t){let n=0;for(let r=0;r<o;++r)(0==r||e[r>>3]&1<<(7&r))&&(t[n++]=r);const r=n-1;for(;n<o;)t[n++]=0;return r}(a,u),d=ParseUint32(t,n);HufUncompress(e.array,t,n,d,r,s);for(let t=0;t<e.channels;++t){const e=i[t];for(let n=0;n<i[t].size;++n)Wav2Decode(r,e.start+n,e.nx,e.size,e.ny,e.nx*e.size,f)}!function ApplyLut(e,t,n){for(let r=0;r<n;++r)t[r]=e[t[r]]}(u,r,s);let w=0;const p=new Uint8Array(r.buffer.byteLength);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){const e=i[t],n=e.nx*e.size,a=new Uint8Array(r.buffer,2*e.end,2*n);p.set(a,w),w+=2*n,e.end+=n}return new DataView(p.buffer)}var w,p=n(8741);!function(e){e[e.Float=0]="Float",e[e.HalfFloat=1]="HalfFloat"}(w||(w={}));class ExrLoaderGlobalConfiguration{}ExrLoaderGlobalConfiguration.DefaultOutputType=w.HalfFloat,ExrLoaderGlobalConfiguration.FFLATEUrl="https://unpkg.com/fflate@0.8.2";class _ExrTextureLoader{constructor(){this.supportCascades=!1}loadCubeData(e,t,n,r,a){throw".exr not supported in Cube."}async loadData(e,t,n){const a=new DataView(e.buffer),o={value:0},s=function GetExrHeader(e,t){if(20000630!=e.getUint32(0,!0))throw new Error("Incorrect OpenEXR format");const n=e.getUint8(4),a=e.getUint8(5),o={singleTile:!!(2&a),longName:!!(4&a),deepFormat:!!(8&a),multiPart:!!(16&a)};t.value=8;const s={};let i=!0;for(;i;){const n=ParseNullTerminatedString(e.buffer,t);if(n){const a=ParseNullTerminatedString(e.buffer,t),o=ParseValue(e,t,a,ParseUint32(e,t));void 0===o?r.Y.Warn(`Unknown header attribute type ${a}'.`):s[n]=o}else i=!1}if(0!=(-5&a))throw new Error("Unsupported file format");return{version:n,spec:o,...s}}(a,o),i=await async function CreateDecoderAsync(e,t,n,r){const a={size:0,viewer:t,array:new Uint8Array(t.buffer),offset:n,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,channelLineOffsets:{},scanOrder:()=>0,bytesPerLine:0,outLineWidth:0,lines:0,scanlineBlockSize:0,inputSize:null,type:0,uncompress:null,getter:()=>0,format:5,outputChannels:0,decodeChannels:{},blockCount:null,byteArray:null,linearSpace:!1,textureType:0};switch(e.compression){case c.NO_COMPRESSION:a.lines=1,a.uncompress=UncompressRAW;break;case c.RLE_COMPRESSION:a.lines=1,a.uncompress=UncompressRLE;break;case c.ZIPS_COMPRESSION:a.lines=1,a.uncompress=UncompressZIP,await p.w1.LoadScriptAsync(ExrLoaderGlobalConfiguration.FFLATEUrl);break;case c.ZIP_COMPRESSION:a.lines=16,a.uncompress=UncompressZIP,await p.w1.LoadScriptAsync(ExrLoaderGlobalConfiguration.FFLATEUrl);break;case c.PIZ_COMPRESSION:a.lines=32,a.uncompress=UncompressPIZ;break;case c.PXR24_COMPRESSION:a.lines=16,a.uncompress=UncompressPXR,await p.w1.LoadScriptAsync(ExrLoaderGlobalConfiguration.FFLATEUrl);break;default:throw new Error(c[e.compression]+" is unsupported")}a.scanlineBlockSize=a.lines;const o={};for(const t of e.channels)switch(t.name){case"Y":case"R":case"G":case"B":case"A":o[t.name]=!0,a.type=t.pixelType}let s=!1;if(o.R&&o.G&&o.B)s=!o.A,a.outputChannels=4,a.decodeChannels={R:0,G:1,B:2,A:3};else{if(!o.Y)throw new Error("EXRLoader.parse: file contains unsupported data channels.");a.outputChannels=1,a.decodeChannels={Y:0}}if(1===a.type)switch(r){case w.Float:a.getter=ParseFloat16,a.inputSize=2;break;case w.HalfFloat:a.getter=ParseUint16,a.inputSize=2}else{if(2!==a.type)throw new Error("Unsupported pixelType "+a.type+" for "+e.compression);switch(r){case w.Float:a.getter=ParseFloat32,a.inputSize=4;break;case w.HalfFloat:a.getter=DecodeFloat32,a.inputSize=4}}a.blockCount=a.height/a.scanlineBlockSize;for(let e=0;e<a.blockCount;e++)ParseInt64(t,n);const i=a.width*a.height*a.outputChannels;switch(r){case w.Float:a.byteArray=new Float32Array(i),a.textureType=1,s&&a.byteArray.fill(1,0,i);break;case w.HalfFloat:a.byteArray=new Uint16Array(i),a.textureType=2,s&&a.byteArray.fill(15360,0,i);break;default:throw new Error("Unsupported type: "+r)}let l=0;for(const t of e.channels)void 0!==a.decodeChannels[t.name]&&(a.channelLineOffsets[t.name]=l*a.width),l+=2*t.pixelType;return a.bytesPerLine=a.width*l,a.outLineWidth=a.width*a.outputChannels,"INCREASING_Y"===e.lineOrder?a.scanOrder=e=>e:a.scanOrder=e=>a.height-1-e,4==a.outputChannels?(a.format=5,a.linearSpace=!0):(a.format=6,a.linearSpace=!1),a}(s,a,o,ExrLoaderGlobalConfiguration.DefaultOutputType);!function ScanData(e,t,n,r){const a={value:0};for(let o=0;o<e.height/e.scanlineBlockSize;o++){const s=ParseInt32(n,r)-t.dataWindow.yMin;e.size=ParseUint32(n,r),e.lines=s+e.scanlineBlockSize>e.height?e.height-s:e.scanlineBlockSize;const i=e.size<e.lines*e.bytesPerLine&&e.uncompress?e.uncompress(e):UncompressRAW(e);r.value+=e.size;for(let n=0;n<e.scanlineBlockSize;n++){const r=o*e.scanlineBlockSize,s=n+e.scanOrder(r);if(s>=e.height)continue;const l=n*e.bytesPerLine,c=(e.height-1-s)*e.outLineWidth;for(let n=0;n<e.channels;n++){const r=t.channels[n].name,o=e.channelLineOffsets[r],s=e.decodeChannels[r];if(void 0!==s){a.value=l+o;for(let t=0;t<e.width;t++){const n=c+t*e.outputChannels+s;e.byteArray&&(e.byteArray[n]=e.getter(i,a))}}}}}}(i,s,a,o);n(s.dataWindow.xMax-s.dataWindow.xMin+1,s.dataWindow.yMax-s.dataWindow.yMin+1,t.generateMipMaps,!1,(()=>{const e=t.getEngine();t.format=s.format,t.type=i.textureType,t.invertY=!1,t._gammaSpace=!s.linearSpace,i.byteArray&&e._uploadDataToTextureDirectly(t,i.byteArray,0,0,void 0,!0)}))}}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4153.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4153],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4153],{1740:(n,e,i)=>{var o=i(7416);i(2889);const t="backgroundUboDeclaration",f="layout(std140,column_major) uniform;uniform Material\n{uniform vec4 vPrimaryColor;uniform vec4 vPrimaryColorShadow;uniform vec2 vDiffuseInfos;uniform vec2 vReflectionInfos;uniform mat4 diffuseMatrix;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;uniform float fFovMultiplier;uniform float pointSize;uniform float shadowLevel;uniform float alpha;uniform vec3 vBackgroundCenter;uniform vec4 vReflectionControl;uniform vec2 projectedGroundInfos;};\n#include<sceneUboDeclaration>\n";o.v.IncludesShadersStore[t]=f},7987:(n,e,i)=>{const o="fogVertex",t="#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},373:(n,e,i)=>{const o="fogVertexDeclaration",t="#ifdef FOG\nvarying vec3 vFogDistance;\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},6589:(n,e,i)=>{const o="lightVxFragmentDeclaration",t="#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},5377:(n,e,i)=>{const o="lightVxUboDeclaration",t="#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#elif defined(SHADOWCUBE{X})\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},9481:(n,e,i)=>{const o="logDepthDeclaration",t="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},627:(n,e,i)=>{const o="logDepthVertex",t="#ifdef LOGARITHMICDEPTH\nvFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},8520:(n,e,i)=>{const o="shadowsVertex",t="#ifdef SHADOWS\n#if defined(SHADOWCSM{X})\nvPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n}\n#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})\nvPositionFromLight{X}=lightMatrix{X}*worldPos;\n#ifdef USE_REVERSE_DEPTHBUFFER\nvDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#else\nvDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;\n#endif\n#endif\n#endif\n";i(7416).v.IncludesShadersStore[o]=t},4153:(n,e,i)=>{i.r(e),i.d(e,{backgroundVertexShader:()=>a});var o=i(7416);const t="uniform mat4 view;uniform mat4 viewProjection;uniform float shadowLevel;\n#ifdef DIFFUSE\nuniform mat4 diffuseMatrix;uniform vec2 vDiffuseInfos;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;uniform vec3 vReflectionMicrosurfaceInfos;uniform float fFovMultiplier;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n";o.v.IncludesShadersStore.backgroundVertexDeclaration=t;i(1740),i(5276),i(3827),i(2335),i(4122),i(110),i(373),i(6589),i(5377),i(9481),i(9449),i(6096),i(3749),i(3888),i(7987),i(8520),i(627);const f="backgroundVertexShader",r="precision highp float;\n#include<__decl__backgroundVertex>\n#include<helperFunctions>\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef MAINUV1\nvarying vec2 vMainUV1;\n#endif\n#ifdef MAINUV2\nvarying vec2 vMainUV2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV==0\nvarying vec2 vDiffuseUV;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=position;\n#endif\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*finalWorld*vec4(position,1.0);} else {gl_Position=viewProjectionR*finalWorld*vec4(position,1.0);}\n#else\ngl_Position=viewProjection*finalWorld*vec4(position,1.0);\n#endif\nvec4 worldPos=finalWorld*vec4(position,1.0);vPositionW=vec3(worldPos);\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normal);\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(position,0.0)));\n#ifdef EQUIRECTANGULAR_RELFECTION_FOV\nmat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection));vec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0));if (fFovMultiplier<=1.0) {vDirectionW=normalize(segment);} else {vDirectionW=normalize(vDirectionW+(vDirectionW-segment));}\n#endif\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uv;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2;\n#endif\n#if defined(DIFFUSE) && DIFFUSEDIRECTUV==0\nif (vDiffuseInfos.x==0.)\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));}\nelse\n{vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\nvColor=color;\n#endif\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}\n";o.v.ShadersStore.backgroundVertexShader=r;const a={name:f,shader:r}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4248.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4248],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4248],{4248:(e,r,a)=>{a.r(r),a.d(r,{vrDistortionCorrectionPixelShader:()=>c});const t="vrDistortionCorrectionPixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 LensCenter;uniform vec2 Scale;uniform vec2 ScaleIn;uniform vec4 HmdWarpParam;vec2 HmdWarp(vec2 in01) {vec2 theta=(in01-LensCenter)*ScaleIn; \nfloat rSq=theta.x*theta.x+theta.y*theta.y;vec2 rvector=theta*(HmdWarpParam.x+HmdWarpParam.y*rSq+HmdWarpParam.z*rSq*rSq+HmdWarpParam.w*rSq*rSq*rSq);return LensCenter+Scale*rvector;}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec2 tc=HmdWarp(vUV);if (tc.x <0.0 || tc.x>1.0 || tc.y<0.0 || tc.y>1.0)\ngl_FragColor=vec4(0.0,0.0,0.0,0.0);else{gl_FragColor=texture2D(textureSampler,tc);}}";a(7416).v.ShadersStore[t]=n;const c={name:t,shader:n}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4378.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4378],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4378],{7987:(e,n,i)=>{const o="fogVertex",r="#ifdef FOG\nvFogDistance=(view*worldPos).xyz;\n#endif\n";i(7416).v.IncludesShadersStore[o]=r},373:(e,n,i)=>{const o="fogVertexDeclaration",r="#ifdef FOG\nvarying vec3 vFogDistance;\n#endif\n";i(7416).v.IncludesShadersStore[o]=r},5095:(e,n,i)=>{const o="vertexColorMixing",r="#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvColor=vec4(1.0);\n#ifdef VERTEXCOLOR\n#ifdef VERTEXALPHA\nvColor*=color;\n#else\nvColor.rgb*=color.rgb;\n#endif\n#endif\n#ifdef INSTANCESCOLOR\nvColor*=instanceColor;\n#endif\n#endif\n";i(7416).v.IncludesShadersStore[o]=r},4378:(e,n,i)=>{i.r(n),i.d(n,{colorVertexShader:()=>t});var o=i(7416);i(3827),i(2335),i(110),i(373),i(4122),i(9449),i(6096),i(3749),i(3888),i(7987),i(5095);const r="colorVertexShader",d="attribute vec3 position;\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#ifdef FOG\nuniform mat4 view;\n#endif\n#include<instancesDeclaration>\nuniform mat4 viewProjection;\n#ifdef MULTIVIEW\nuniform mat4 viewProjectionR;\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<vertexColorMixing>\n#define CUSTOM_VERTEX_MAIN_END\n}";o.v.ShadersStore[r]=d;const t={name:r,shader:d}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4431.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4431],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4431],{1596:(e,r,n)=>{const t="imageProcessingDeclaration",i="#ifdef EXPOSURE\nuniform exposureLinear: f32;\n#endif\n#ifdef CONTRAST\nuniform contrast: f32;\n#endif\n#if defined(VIGNETTE) || defined(DITHER)\nuniform vInverseScreenSize: vec2f;\n#endif\n#ifdef VIGNETTE\nuniform vignetteSettings1: vec4f;uniform vignetteSettings2: vec4f;\n#endif\n#ifdef COLORCURVES\nuniform vCameraColorCurveNegative: vec4f;uniform vCameraColorCurveNeutral: vec4f;uniform vCameraColorCurvePositive: vec4f;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nvar txColorTransformSampler: sampler;var txColorTransform: texture_3d<f32>;\n#else\nvar txColorTransformSampler: sampler;var txColorTransform: texture_2d<f32>;\n#endif\nuniform colorTransformSettings: vec4f;\n#endif\n#ifdef DITHER\nuniform ditherIntensity: f32;\n#endif\n";n(7416).v.IncludesShadersStoreWGSL[t]=i},1916:(e,r,n)=>{const t="imageProcessingFunctions",i="#if TONEMAPPING==3\nconst PBRNeutralStartCompression: f32=0.8-0.04;const PBRNeutralDesaturation: f32=0.15;fn PBRNeutralToneMapping( color: vec3f )->vec3f {var x: f32=min(color.r,min(color.g,color.b));var offset: f32=select(0.04,x-6.25*x*x,x<0.08);var result=color;result-=offset;var peak: f32=max(result.r,max(result.g,result.b));if (peak<PBRNeutralStartCompression) {return result;}\nvar d: f32=1.-PBRNeutralStartCompression;var newPeak: f32=1.-d*d/(peak+d-PBRNeutralStartCompression);result*=newPeak/peak;var g: f32=1.-1./(PBRNeutralDesaturation*(peak-newPeak)+1.);return mix(result,newPeak* vec3f(1,1,1),g);}\n#endif\n#if TONEMAPPING==2\nconst ACESInputMat: mat3x3f= mat3x3f(\nvec3f(0.59719,0.07600,0.02840),\nvec3f(0.35458,0.90834,0.13383),\nvec3f(0.04823,0.01566,0.83777)\n);const ACESOutputMat: mat3x3f= mat3x3f(\nvec3f( 1.60475,-0.10208,-0.00327),\nvec3f(-0.53108, 1.10813,-0.07276),\nvec3f(-0.07367,-0.00605, 1.07602)\n);fn RRTAndODTFit(v: vec3f)->vec3f\n{var a: vec3f=v*(v+0.0245786)-0.000090537;var b: vec3f=v*(0.983729*v+0.4329510)+0.238081;return a/b;}\nfn ACESFitted(color: vec3f)->vec3f\n{var output=ACESInputMat*color;output=RRTAndODTFit(output);output=ACESOutputMat*output;output=saturateVec3(output);return output;}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nfn applyImageProcessing(result: vec4f)->vec4f {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\nvar rgb=result.rgb;;\n#ifdef EXPOSURE\nrgb*=uniforms.exposureLinear;\n#endif\n#ifdef VIGNETTE\nvar viewportXY: vec2f=fragmentInputs.position.xy*uniforms.vInverseScreenSize;viewportXY=viewportXY*2.0-1.0;var vignetteXY1: vec3f= vec3f(viewportXY*uniforms.vignetteSettings1.xy+uniforms.vignetteSettings1.zw,1.0);var vignetteTerm: f32=dot(vignetteXY1,vignetteXY1);var vignette: f32=pow(vignetteTerm,uniforms.vignetteSettings2.w);var vignetteColor: vec3f=uniforms.vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvar vignetteColorMultiplier: vec3f=mix(vignetteColor, vec3f(1,1,1),vignette);rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nrgb=mix(vignetteColor,rgb,vignette);\n#endif\n#endif\n#if TONEMAPPING==3\nrgb=PBRNeutralToneMapping(rgb);\n#elif TONEMAPPING==2\nrgb=ACESFitted(rgb);\n#elif TONEMAPPING==1\nconst tonemappingCalibration: f32=1.590579;rgb=1.0-exp2(-tonemappingCalibration*rgb);\n#endif\nrgb=toGammaSpaceVec3(rgb);rgb=saturateVec3(rgb);\n#ifdef CONTRAST\nvar resultHighContrast: vec3f=rgb*rgb*(3.0-2.0*rgb);if (uniforms.contrast<1.0) {rgb=mix( vec3f(0.5,0.5,0.5),rgb,uniforms.contrast);} else {rgb=mix(rgb,resultHighContrast,uniforms.contrast-1.0);}\n#endif\n#ifdef COLORGRADING\nvar colorTransformInput: vec3f=rgb*uniforms.colorTransformSettings.xxx+uniforms.colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput).rgb;\n#else\nvar colorTransformOutput: vec3f=textureSample(txColorTransform,txColorTransformSampler,colorTransformInput,uniforms.colorTransformSettings.yz).rgb;\n#endif\nrgb=mix(rgb,colorTransformOutput,uniforms.colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nvar luma: f32=getLuminance(rgb);var curveMix: vec2f=clamp( vec2f(luma*3.0-1.5,luma*-3.0+1.5), vec2f(0.0), vec2f(1.0));var colorCurve: vec4f=uniforms.vCameraColorCurveNeutral+curveMix.x*uniforms.vCameraColorCurvePositive-curveMix.y*uniforms.vCameraColorCurveNegative;rgb*=colorCurve.rgb;rgb=mix( vec3f(luma),rgb,colorCurve.a);\n#endif\n#ifdef DITHER\nvar rand: f32=getRand(fragmentInputs.position.xy*uniforms.vInverseScreenSize);var dither: f32=mix(-uniforms.ditherIntensity,uniforms.ditherIntensity,rand);rgb=saturateVec3(rgb+ vec3f(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn vec4f(rgb,result.a);}";n(7416).v.IncludesShadersStoreWGSL[t]=i},4431:(e,r,n)=>{n.r(r),n.d(r,{imageProcessingPixelShaderWGSL:()=>o});var t=n(7416);n(1596),n(2842),n(1916);const i="imageProcessingPixelShader",f="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var result: vec4f=textureSample(textureSampler,textureSamplerSampler,input.vUV);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\nresult=vec4f(toLinearSpaceVec3(result.rgb),result.a);\n#endif\nresult=applyImageProcessing(result);\n#else\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\nfragmentOutputs.color=result;}";t.v.ShadersStoreWGSL[i]=f;const o={name:i,shader:f}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 4542.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4542],{5225:(e,o,n)=>{const i="fogFragment",t="#ifdef FOG\nfloat fog=CalcFogFactor();\n#ifdef PBR\nfog=toLinearSpace(fog);\n#endif\ncolor.rgb=mix(vFogColor,color.rgb,fog);\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},2302:(e,o,n)=>{const i="fogFragmentDeclaration",t="#ifdef FOG\n#define FOGMODE_NONE 0.\n#define FOGMODE_EXP 1.\n#define FOGMODE_EXP2 2.\n#define FOGMODE_LINEAR 3.\n#define E 2.71828\nuniform vec4 vFogInfos;uniform vec3 vFogColor;varying vec3 vFogDistance;float CalcFogFactor()\n{float fogCoeff=1.0;float fogStart=vFogInfos.y;float fogEnd=vFogInfos.z;float fogDensity=vFogInfos.w;float fogDistance=length(vFogDistance);if (FOGMODE_LINEAR==vFogInfos.x)\n{fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart);}\nelse if (FOGMODE_EXP==vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDensity);}\nelse if (FOGMODE_EXP2==vFogInfos.x)\n{fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);}\nreturn clamp(fogCoeff,0.0,1.0);}\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},6757:(e,o,n)=>{const i="imageProcessingDeclaration",t="#ifdef EXPOSURE\nuniform float exposureLinear;\n#endif\n#ifdef CONTRAST\nuniform float contrast;\n#endif\n#if defined(VIGNETTE) || defined(DITHER)\nuniform vec2 vInverseScreenSize;\n#endif\n#ifdef VIGNETTE\nuniform vec4 vignetteSettings1;uniform vec4 vignetteSettings2;\n#endif\n#ifdef COLORCURVES\nuniform vec4 vCameraColorCurveNegative;uniform vec4 vCameraColorCurveNeutral;uniform vec4 vCameraColorCurvePositive;\n#endif\n#ifdef COLORGRADING\n#ifdef COLORGRADING3D\nuniform highp sampler3D txColorTransform;\n#else\nuniform sampler2D txColorTransform;\n#endif\nuniform vec4 colorTransformSettings;\n#endif\n#ifdef DITHER\nuniform float ditherIntensity;\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},3936:(e,o,n)=>{const i="imageProcessingFunctions",t="#if defined(COLORGRADING) && !defined(COLORGRADING3D)\n/** \n* Polyfill for SAMPLE_TEXTURE_3D,which is unsupported in WebGL.\n* sampler3dSetting.x=textureOffset (0.5/textureSize).\n* sampler3dSetting.y=textureSize.\n*/\n#define inline\nvec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting)\n{float sliceSize=2.0*sampler3dSetting.x; \n#ifdef SAMPLER3DGREENDEPTH\nfloat sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y;\n#else\nfloat sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y;\n#endif\nfloat sliceInteger=floor(sliceContinuous);float sliceFraction=sliceContinuous-sliceInteger;\n#ifdef SAMPLER3DGREENDEPTH\nvec2 sliceUV=color.rb;\n#else\nvec2 sliceUV=color.rg;\n#endif\nsliceUV.x*=sliceSize;sliceUV.x+=sliceInteger*sliceSize;sliceUV=saturate(sliceUV);vec4 slice0Color=texture2D(colorTransform,sliceUV);sliceUV.x+=sliceSize;sliceUV=saturate(sliceUV);vec4 slice1Color=texture2D(colorTransform,sliceUV);vec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction);\n#ifdef SAMPLER3DBGRMAP\ncolor.rgb=result.rgb;\n#else\ncolor.rgb=result.bgr;\n#endif\nreturn color;}\n#endif\n#if TONEMAPPING==3\nconst float PBRNeutralStartCompression=0.8-0.04;const float PBRNeutralDesaturation=0.15;vec3 PBRNeutralToneMapping( vec3 color ) {float x=min(color.r,min(color.g,color.b));float offset=x<0.08 ? x-6.25*x*x : 0.04;color-=offset;float peak=max(color.r,max(color.g,color.b));if (peak<PBRNeutralStartCompression) return color;float d=1.-PBRNeutralStartCompression;float newPeak=1.-d*d/(peak+d-PBRNeutralStartCompression);color*=newPeak/peak;float g=1.-1./(PBRNeutralDesaturation*(peak-newPeak)+1.);return mix(color,newPeak*vec3(1,1,1),g);}\n#endif\n#if TONEMAPPING==2\nconst mat3 ACESInputMat=mat3(\nvec3(0.59719,0.07600,0.02840),\nvec3(0.35458,0.90834,0.13383),\nvec3(0.04823,0.01566,0.83777)\n);const mat3 ACESOutputMat=mat3(\nvec3( 1.60475,-0.10208,-0.00327),\nvec3(-0.53108, 1.10813,-0.07276),\nvec3(-0.07367,-0.00605, 1.07602)\n);vec3 RRTAndODTFit(vec3 v)\n{vec3 a=v*(v+0.0245786)-0.000090537;vec3 b=v*(0.983729*v+0.4329510)+0.238081;return a/b;}\nvec3 ACESFitted(vec3 color)\n{color=ACESInputMat*color;color=RRTAndODTFit(color);color=ACESOutputMat*color;color=saturate(color);return color;}\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_DEFINITIONS\nvec4 applyImageProcessing(vec4 result) {\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATSTART\n#ifdef EXPOSURE\nresult.rgb*=exposureLinear;\n#endif\n#ifdef VIGNETTE\nvec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize;viewportXY=viewportXY*2.0-1.0;vec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0);float vignetteTerm=dot(vignetteXY1,vignetteXY1);float vignette=pow(vignetteTerm,vignetteSettings2.w);vec3 vignetteColor=vignetteSettings2.rgb;\n#ifdef VIGNETTEBLENDMODEMULTIPLY\nvec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette);result.rgb*=vignetteColorMultiplier;\n#endif\n#ifdef VIGNETTEBLENDMODEOPAQUE\nresult.rgb=mix(vignetteColor,result.rgb,vignette);\n#endif\n#endif\n#if TONEMAPPING==3\nresult.rgb=PBRNeutralToneMapping(result.rgb);\n#elif TONEMAPPING==2\nresult.rgb=ACESFitted(result.rgb);\n#elif TONEMAPPING==1\nconst float tonemappingCalibration=1.590579;result.rgb=1.0-exp2(-tonemappingCalibration*result.rgb);\n#endif\nresult.rgb=toGammaSpace(result.rgb);result.rgb=saturate(result.rgb);\n#ifdef CONTRAST\nvec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb);if (contrast<1.0) {result.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast);} else {result.rgb=mix(result.rgb,resultHighContrast,contrast-1.0);}\n#endif\n#ifdef COLORGRADING\nvec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy;\n#ifdef COLORGRADING3D\nvec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb;\n#else\nvec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb;\n#endif\nresult.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www);\n#endif\n#ifdef COLORCURVES\nfloat luma=getLuminance(result.rgb);vec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0));vec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative;result.rgb*=colorCurve.rgb;result.rgb=mix(vec3(luma),result.rgb,colorCurve.a);\n#endif\n#ifdef DITHER\nfloat rand=getRand(gl_FragCoord.xy*vInverseScreenSize);float dither=mix(-ditherIntensity,ditherIntensity,rand);result.rgb=saturate(result.rgb+vec3(dither));\n#endif\n#define CUSTOM_IMAGEPROCESSINGFUNCTIONS_UPDATERESULT_ATEND\nreturn result;}";n(7416).v.IncludesShadersStore[i]=t},6012:(e,o,n)=>{const i="lightFragment",t="#ifdef LIGHT{X}\n#if defined(SHADOWONLY) || defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X})\n#else\nvec4 diffuse{X}=light{X}.vLightDiffuse;\n#define CUSTOM_LIGHT{X}_COLOR \n#ifdef PBR\n#ifdef SPOTLIGHT{X}\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW,vPositionW);\n#elif defined(POINTLIGHT{X})\npreInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW,vPositionW);\n#elif defined(HEMILIGHT{X})\npreInfo=computeHemisphericPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#elif defined(DIRLIGHT{X})\npreInfo=computeDirectionalPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW);\n#endif\npreInfo.NdotV=NdotV;\n#ifdef SPOTLIGHT{X}\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);preInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);preInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);preInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w);\n#else\npreInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);preInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w);\n#endif\n#elif defined(POINTLIGHT{X})\n#ifdef LIGHT_FALLOFF_GLTF{X}\npreInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y);\n#elif defined(LIGHT_FALLOFF_PHYSICAL{X})\npreInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared);\n#elif defined(LIGHT_FALLOFF_STANDARD{X})\npreInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x);\n#else\npreInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y);\n#endif\n#else\npreInfo.attenuation=1.0;\n#endif\n#ifdef HEMILIGHT{X}\npreInfo.roughness=roughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(roughness,light{X}.vLightSpecular.a,preInfo.lightDistance);\n#endif\n#ifdef IRIDESCENCE\npreInfo.iridescenceIntensity=iridescenceIntensity;\n#endif\n#ifdef HEMILIGHT{X}\ninfo.diffuse=computeHemisphericDiffuseLighting(preInfo,diffuse{X}.rgb,light{X}.vLightGround);\n#elif defined(SS_TRANSLUCENCY)\ninfo.diffuse=computeDiffuseAndTransmittedLighting(preInfo,diffuse{X}.rgb,subSurfaceOut.transmittance);\n#else\ninfo.diffuse=computeDiffuseLighting(preInfo,diffuse{X}.rgb);\n#endif\n#ifdef SPECULARTERM\n#ifdef ANISOTROPIC\ninfo.specular=computeAnisotropicSpecularLighting(preInfo,viewDirectionW,normalW,anisotropicOut.anisotropicTangent,anisotropicOut.anisotropicBitangent,anisotropicOut.anisotropy,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);\n#else\ninfo.specular=computeSpecularLighting(preInfo,normalW,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);\n#endif\n#endif\n#ifdef SHEEN\n#ifdef SHEEN_LINKWITHALBEDO\npreInfo.roughness=sheenOut.sheenIntensity;\n#else\n#ifdef HEMILIGHT{X}\npreInfo.roughness=sheenOut.sheenRoughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(sheenOut.sheenRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance);\n#endif\n#endif\ninfo.sheen=computeSheenLighting(preInfo,normalW,sheenOut.sheenColor,specularEnvironmentR90,AARoughnessFactors.x,diffuse{X}.rgb);\n#endif\n#ifdef CLEARCOAT\n#ifdef HEMILIGHT{X}\npreInfo.roughness=clearcoatOut.clearCoatRoughness;\n#else\npreInfo.roughness=adjustRoughnessFromLightProperties(clearcoatOut.clearCoatRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance);\n#endif\ninfo.clearCoat=computeClearCoatLighting(preInfo,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatAARoughnessFactors.x,clearcoatOut.clearCoatIntensity,diffuse{X}.rgb);\n#ifdef CLEARCOAT_TINT\nabsorption=computeClearCoatLightingAbsorption(clearcoatOut.clearCoatNdotVRefract,preInfo.L,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatColor,clearcoatOut.clearCoatThickness,clearcoatOut.clearCoatIntensity);info.diffuse*=absorption;\n#ifdef SPECULARTERM\ninfo.specular*=absorption;\n#endif\n#endif\ninfo.diffuse*=info.clearCoat.w;\n#ifdef SPECULARTERM\ninfo.specular*=info.clearCoat.w;\n#endif\n#ifdef SHEEN\ninfo.sheen*=info.clearCoat.w;\n#endif\n#endif\n#else\n#ifdef SPOTLIGHT{X}\ninfo=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness);\n#elif defined(HEMILIGHT{X})\ninfo=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightGround,glossiness);\n#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X})\ninfo=computeLighting(viewDirectionW,normalW,light{X}.vLightData,diffuse{X}.rgb,light{X}.vLightSpecular.rgb,diffuse{X}.a,glossiness);\n#endif\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\ninfo.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightTexture{X},textureProjectionMatrix{X},vPositionW);\n#endif\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nfor (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) \n{\n#ifdef SHADOWCSM_RIGHTHANDED{X}\ndiff{X}=viewFrustumZ{X}[i]+vPositionFromCamera{X}.z;\n#else\ndiff{X}=viewFrustumZ{X}[i]-vPositionFromCamera{X}.z;\n#endif\nif (diff{X}>=0.) {index{X}=i;break;}}\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nif (index{X}>=0)\n#endif\n{\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#else\nshadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#endif\n#else\nshadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=vec3(shadow)*vCascadeColorsMultiplier{X}[index{X}];\n#endif\n#ifndef SHADOWCSMNOBLEND{X}\nfloat frustumLength=frustumLengths{X}[index{X}];float diffRatio=clamp(diff{X}/frustumLength,0.,1.)*cascadeBlendFactor{X};if (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.)\n{index{X}+=1;float nextShadow=0.;\n#if defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nnextShadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#elif defined(SHADOWMEDIUMQUALITY{X})\nnextShadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#else\nnextShadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X});\n#endif\n#else\nnextShadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\nshadow=mix(nextShadow,shadow,diffRatio);\n#ifdef SHADOWCSMDEBUG{X}\nshadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio);\n#endif\n}\n#endif\n}\n#elif defined(SHADOWCLOSEESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithCloseESMCube(vPositionW,light{X}.vLightData.xyz,shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWESM{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithESMCube(vPositionW,light{X}.vLightData.xyz,shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues);\n#else\nshadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPOISSON{X})\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowWithPoissonSamplingCube(vPositionW,light{X}.vLightData.xyz,shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCF{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#elif defined(SHADOWPCSS{X})\n#if defined(SHADOWLOWQUALITY{X})\nshadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#elif defined(SHADOWMEDIUMQUALITY{X})\nshadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#else\nshadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthTexture{X},shadowTexture{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#else\n#if defined(SHADOWCUBE{X})\nshadow=computeShadowCube(vPositionW,light{X}.vLightData.xyz,shadowTexture{X},light{X}.shadowsInfo.x,light{X}.depthValues);\n#else\nshadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowTexture{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w);\n#endif\n#endif\n#ifdef SHADOWONLY\n#ifndef SHADOWINUSE\n#define SHADOWINUSE\n#endif\nglobalShadow+=shadow;shadowLightCount+=1.0;\n#endif\n#else\nshadow=1.;\n#endif\naggShadow+=shadow;numLights+=1.0;\n#ifndef SHADOWONLY\n#ifdef CUSTOMUSERLIGHTING\ndiffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow);\n#ifdef SPECULARTERM\nspecularBase+=computeCustomSpecularLighting(info,specularBase,shadow);\n#endif\n#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X})\ndiffuseBase+=lightmapColor.rgb*shadow;\n#ifdef SPECULARTERM\n#ifndef LIGHTMAPNOSPECULAR{X}\nspecularBase+=info.specular*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef CLEARCOAT\n#ifndef LIGHTMAPNOSPECULAR{X}\nclearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb;\n#endif\n#endif\n#ifdef SHEEN\n#ifndef LIGHTMAPNOSPECULAR{X}\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#else\n#ifdef SHADOWCSMDEBUG{X}\ndiffuseBase+=info.diffuse*shadowDebug{X};\n#else \ndiffuseBase+=info.diffuse*shadow;\n#endif\n#ifdef SPECULARTERM\nspecularBase+=info.specular*shadow;\n#endif\n#ifdef CLEARCOAT\nclearCoatBase+=info.clearCoat.rgb*shadow;\n#endif\n#ifdef SHEEN\nsheenBase+=info.sheen.rgb*shadow;\n#endif\n#endif\n#endif\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},8494:(e,o,n)=>{const i="lightFragmentDeclaration",t="#ifdef LIGHT{X}\nuniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};\n#ifdef SPECULARTERM\nuniform vec4 vLightSpecular{X};\n#else\nvec4 vLightSpecular{X}=vec4(0.);\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];uniform float cascadeBlendFactor{X};varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowTexture{X};uniform highp sampler2DArray depthTexture{X};uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowTexture{X};\n#else\nuniform highp sampler2DArray shadowTexture{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]\n(\nvec3 ( 1.5,0.0,0.0 ),\nvec3 ( 0.0,1.5,0.0 ),\nvec3 ( 0.0,0.0,5.5 ),\nvec3 ( 1.5,0.0,5.5 ),\nvec3 ( 1.5,1.5,0.0 ),\nvec3 ( 1.0,1.0,1.0 ),\nvec3 ( 0.0,1.0,5.5 ),\nvec3 ( 0.5,3.5,0.75 )\n);vec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X}=-1;\n#else\nint index{X}=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nfloat diff{X}=0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowTexture{X};\n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowTexture{X};uniform highp sampler2D depthTexture{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowTexture{X};\n#else\nuniform sampler2D shadowTexture{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\nuniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};\n#endif\n#ifdef SPOTLIGHT{X}\nuniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};\n#elif defined(POINTLIGHT{X})\nuniform vec4 vLightFalloff{X};\n#elif defined(HEMILIGHT{X})\nuniform vec3 vLightGround{X};\n#endif\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};uniform sampler2D projectionLightTexture{X};\n#endif\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},3323:(e,o,n)=>{const i="lightUboDeclaration",t="#ifdef LIGHT{X}\nuniform Light{X}\n{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;\n#ifdef SPOTLIGHT{X}\nvec4 vLightDirection;vec4 vLightFalloff;\n#elif defined(POINTLIGHT{X})\nvec4 vLightFalloff;\n#elif defined(HEMILIGHT{X})\nvec3 vLightGround;\n#endif\nvec4 shadowsInfo;vec2 depthValues;} light{X};\n#ifdef PROJECTEDLIGHTTEXTURE{X}\nuniform mat4 textureProjectionMatrix{X};uniform sampler2D projectionLightTexture{X};\n#endif\n#ifdef SHADOW{X}\n#ifdef SHADOWCSM{X}\nuniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}];uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}];uniform float cascadeBlendFactor{X};varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DArrayShadow shadowTexture{X};uniform highp sampler2DArray depthTexture{X};uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}];uniform float penumbraDarkness{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DArrayShadow shadowTexture{X};\n#else\nuniform highp sampler2DArray shadowTexture{X};\n#endif\n#ifdef SHADOWCSMDEBUG{X}\nconst vec3 vCascadeColorsMultiplier{X}[8]=vec3[8]\n(\nvec3 ( 1.5,0.0,0.0 ),\nvec3 ( 0.0,1.5,0.0 ),\nvec3 ( 0.0,0.0,5.5 ),\nvec3 ( 1.5,0.0,5.5 ),\nvec3 ( 1.5,1.5,0.0 ),\nvec3 ( 1.0,1.0,1.0 ),\nvec3 ( 0.0,1.0,5.5 ),\nvec3 ( 0.5,3.5,0.75 )\n);vec3 shadowDebug{X};\n#endif\n#ifdef SHADOWCSMUSESHADOWMAXZ{X}\nint index{X}=-1;\n#else\nint index{X}=SHADOWCSMNUM_CASCADES{X}-1;\n#endif\nfloat diff{X}=0.;\n#elif defined(SHADOWCUBE{X})\nuniform samplerCube shadowTexture{X}; \n#else\nvarying vec4 vPositionFromLight{X};varying float vDepthMetric{X};\n#if defined(SHADOWPCSS{X})\nuniform highp sampler2DShadow shadowTexture{X};uniform highp sampler2D depthTexture{X};\n#elif defined(SHADOWPCF{X})\nuniform highp sampler2DShadow shadowTexture{X};\n#else\nuniform sampler2D shadowTexture{X};\n#endif\nuniform mat4 lightMatrix{X};\n#endif\n#endif\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},9481:(e,o,n)=>{const i="logDepthDeclaration",t="#ifdef LOGARITHMICDEPTH\nuniform float logarithmicDepthConstant;varying float vFragmentDepth;\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},6564:(e,o,n)=>{const i="logDepthFragment",t="#ifdef LOGARITHMICDEPTH\ngl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},2628:(e,o,n)=>{const i="reflectionFunction",t="vec3 computeFixedEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 direction)\n{float lon=atan(direction.z,direction.x);float lat=acos(direction.y);vec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;float s=sphereCoords.x*0.5+0.5;float t=sphereCoords.y;return vec3(s,t,0); }\nvec3 computeMirroredFixedEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 direction)\n{float lon=atan(direction.z,direction.x);float lat=acos(direction.y);vec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;float s=sphereCoords.x*0.5+0.5;float t=sphereCoords.y;return vec3(1.0-s,t,0); }\nvec3 computeEquirectangularCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{vec3 cameraToVertex=normalize(worldPos.xyz-eyePosition);vec3 r=normalize(reflect(cameraToVertex,worldNormal));r=vec3(reflectionMatrix*vec4(r,0));float lon=atan(r.z,r.x);float lat=acos(r.y);vec2 sphereCoords=vec2(lon,lat)*RECIPROCAL_PI2*2.0;float s=sphereCoords.x*0.5+0.5;float t=sphereCoords.y;return vec3(s,t,0);}\nvec3 computeSphericalCoords(vec4 worldPos,vec3 worldNormal,mat4 view,mat4 reflectionMatrix)\n{vec3 viewDir=normalize(vec3(view*worldPos));vec3 viewNormal=normalize(vec3(view*vec4(worldNormal,0.0)));vec3 r=reflect(viewDir,viewNormal);r=vec3(reflectionMatrix*vec4(r,0));r.z=r.z-1.0;float m=2.0*length(r);return vec3(r.x/m+0.5,1.0-r.y/m-0.5,0);}\nvec3 computePlanarCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{vec3 viewDir=worldPos.xyz-eyePosition;vec3 coords=normalize(reflect(viewDir,worldNormal));return vec3(reflectionMatrix*vec4(coords,1));}\nvec3 computeCubicCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix)\n{vec3 viewDir=normalize(worldPos.xyz-eyePosition);vec3 coords=reflect(viewDir,worldNormal);coords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;}\nvec3 computeCubicLocalCoords(vec4 worldPos,vec3 worldNormal,vec3 eyePosition,mat4 reflectionMatrix,vec3 reflectionSize,vec3 reflectionPosition)\n{vec3 viewDir=normalize(worldPos.xyz-eyePosition);vec3 coords=reflect(viewDir,worldNormal);coords=parallaxCorrectNormal(worldPos.xyz,coords,reflectionSize,reflectionPosition);coords=vec3(reflectionMatrix*vec4(coords,0));\n#ifdef INVERTCUBICMAP\ncoords.y*=-1.0;\n#endif\nreturn coords;}\nvec3 computeProjectionCoords(vec4 worldPos,mat4 view,mat4 reflectionMatrix)\n{return vec3(reflectionMatrix*(view*worldPos));}\nvec3 computeSkyBoxCoords(vec3 positionW,mat4 reflectionMatrix)\n{return vec3(reflectionMatrix*vec4(positionW,1.));}\n#ifdef REFLECTION\nvec3 computeReflectionCoords(vec4 worldPos,vec3 worldNormal)\n{\n#ifdef REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED\nvec3 direction=normalize(vDirectionW);return computeMirroredFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR_FIXED\nvec3 direction=normalize(vDirectionW);return computeFixedEquirectangularCoords(worldPos,worldNormal,direction);\n#endif\n#ifdef REFLECTIONMAP_EQUIRECTANGULAR\nreturn computeEquirectangularCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SPHERICAL\nreturn computeSphericalCoords(worldPos,worldNormal,view,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_PLANAR\nreturn computePlanarCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_CUBIC\n#ifdef USE_LOCAL_REFLECTIONMAP_CUBIC\nreturn computeCubicLocalCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix,vReflectionSize,vReflectionPosition);\n#else\nreturn computeCubicCoords(worldPos,worldNormal,vEyePosition.xyz,reflectionMatrix);\n#endif\n#endif\n#ifdef REFLECTIONMAP_PROJECTION\nreturn computeProjectionCoords(worldPos,view,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_SKYBOX\nreturn computeSkyBoxCoords(vPositionUVW,reflectionMatrix);\n#endif\n#ifdef REFLECTIONMAP_EXPLICIT\nreturn vec3(0,0,0);\n#endif\n}\n#endif\n";n(7416).v.IncludesShadersStore[i]=t},198:(e,o,n)=>{const i="shadowsFragmentFunctions",t="#ifdef SHADOWS\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define TEXTUREFUNC(s,c,l) texture2DLodEXT(s,c,l)\n#else\n#define TEXTUREFUNC(s,c,b) texture2D(s,c,b)\n#endif\n#ifndef SHADOWFLOAT\nfloat unpack(vec4 color)\n{const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}\n#endif\nfloat computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff)\n{float mask=smoothstep(1.0-frustumEdgeFalloff,1.00000012,clamp(dot(clipSpace,clipSpace),0.,1.));return mix(value,1.0,mask);}\n#define inline\nfloat computeShadowCube(vec3 worldPos,vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues)\n{vec3 directionToLight=worldPos-lightPosition;float depth=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);depth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadow=textureCube(shadowSampler,directionToLight).x;\n#endif\nreturn depth>shadow ? darkness : 1.0;}\n#define inline\nfloat computeShadowWithPoissonSamplingCube(vec3 worldPos,vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues)\n{vec3 directionToLight=worldPos-lightPosition;float depth=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);depth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;float visibility=1.;vec3 poissonDisk[4];poissonDisk[0]=vec3(-1.0,1.0,-1.0);poissonDisk[1]=vec3(1.0,-1.0,-1.0);poissonDisk[2]=vec3(-1.0,-1.0,-1.0);poissonDisk[3]=vec3(1.0,-1.0,1.0);\n#ifndef SHADOWFLOAT\nif (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))<depth) visibility-=0.25;if (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[1]*mapSize))<depth) visibility-=0.25;if (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[2]*mapSize))<depth) visibility-=0.25;if (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[3]*mapSize))<depth) visibility-=0.25;\n#else\nif (textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize).x<depth) visibility-=0.25;if (textureCube(shadowSampler,directionToLight+poissonDisk[1]*mapSize).x<depth) visibility-=0.25;if (textureCube(shadowSampler,directionToLight+poissonDisk[2]*mapSize).x<depth) visibility-=0.25;if (textureCube(shadowSampler,directionToLight+poissonDisk[3]*mapSize).x<depth) visibility-=0.25;\n#endif\nreturn min(1.0,visibility+darkness);}\n#define inline\nfloat computeShadowWithESMCube(vec3 worldPos,vec3 lightPosition,samplerCube shadowSampler,float darkness,float depthScale,vec2 depthValues)\n{vec3 directionToLight=worldPos-lightPosition;float depth=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);float shadowPixelDepth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadowMapSample=textureCube(shadowSampler,directionToLight).x;\n#endif\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);return esm;}\n#define inline\nfloat computeShadowWithCloseESMCube(vec3 worldPos,vec3 lightPosition,samplerCube shadowSampler,float darkness,float depthScale,vec2 depthValues)\n{vec3 directionToLight=worldPos-lightPosition;float depth=length(directionToLight);depth=(depth+depthValues.x)/(depthValues.y);float shadowPixelDepth=clamp(depth,0.,1.0);directionToLight=normalize(directionToLight);directionToLight.y=-directionToLight.y;\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(textureCube(shadowSampler,directionToLight));\n#else\nfloat shadowMapSample=textureCube(shadowSampler,directionToLight).x;\n#endif\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);return esm;}\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define inline\nfloat computeShadowCSM(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray shadowSampler,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);vec3 uvLayer=vec3(uv.x,uv.y,layer);float shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(texture2D(shadowSampler,uvLayer));\n#else\nfloat shadow=texture2D(shadowSampler,uvLayer).x;\n#endif\nreturn shadowPixelDepth>shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.;}\n#endif\n#define inline\nfloat computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadow=unpack(TEXTUREFUNC(shadowSampler,uv,0.));\n#else\nfloat shadow=TEXTUREFUNC(shadowSampler,uv,0.).x;\n#endif\nreturn shadowPixelDepth>shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.;}}\n#define inline\nfloat computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0);float visibility=1.;vec2 poissonDisk[4];poissonDisk[0]=vec2(-0.94201624,-0.39906216);poissonDisk[1]=vec2(0.94558609,-0.76890725);poissonDisk[2]=vec2(-0.094184101,-0.92938870);poissonDisk[3]=vec2(0.34495938,0.29387760);\n#ifndef SHADOWFLOAT\nif (unpack(TEXTUREFUNC(shadowSampler,uv+poissonDisk[0]*mapSize,0.))<shadowPixelDepth) visibility-=0.25;if (unpack(TEXTUREFUNC(shadowSampler,uv+poissonDisk[1]*mapSize,0.))<shadowPixelDepth) visibility-=0.25;if (unpack(TEXTUREFUNC(shadowSampler,uv+poissonDisk[2]*mapSize,0.))<shadowPixelDepth) visibility-=0.25;if (unpack(TEXTUREFUNC(shadowSampler,uv+poissonDisk[3]*mapSize,0.))<shadowPixelDepth) visibility-=0.25;\n#else\nif (TEXTUREFUNC(shadowSampler,uv+poissonDisk[0]*mapSize,0.).x<shadowPixelDepth) visibility-=0.25;if (TEXTUREFUNC(shadowSampler,uv+poissonDisk[1]*mapSize,0.).x<shadowPixelDepth) visibility-=0.25;if (TEXTUREFUNC(shadowSampler,uv+poissonDisk[2]*mapSize,0.).x<shadowPixelDepth) visibility-=0.25;if (TEXTUREFUNC(shadowSampler,uv+poissonDisk[3]*mapSize,0.).x<shadowPixelDepth) visibility-=0.25;\n#endif\nreturn computeFallOff(min(1.0,visibility+darkness),clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0);\n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(TEXTUREFUNC(shadowSampler,uv,0.));\n#else\nfloat shadowMapSample=TEXTUREFUNC(shadowSampler,uv,0.).x;\n#endif\nfloat esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness);return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec2 uv=0.5*clipSpace.xy+vec2(0.5);if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0)\n{return 1.0;}\nelse\n{float shadowPixelDepth=clamp(depthMetric,0.,1.0); \n#ifndef SHADOWFLOAT\nfloat shadowMapSample=unpack(TEXTUREFUNC(shadowSampler,uv,0.));\n#else\nfloat shadowMapSample=TEXTUREFUNC(shadowSampler,uv,0.).x;\n#endif\nfloat esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.);return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff);}}\n#ifdef IS_NDC_HALF_ZRANGE\n#define ZINCLIP clipSpace.z\n#else\n#define ZINCLIP uvDepth.z\n#endif\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\n#define GREATEST_LESS_THAN_ONE 0.99999994\n#define DISABLE_UNIFORMITY_ANALYSIS\n#define inline\nfloat computeShadowWithCSMPCF1(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z);float shadow=texture2D(shadowSampler,uvDepthLayer);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\n#define inline\nfloat computeShadowWithCSMPCF3(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=3.-2.*st;vec2 uvw1=1.+2.*st;vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z));shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z));shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z));shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z));shadow=shadow/16.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\n#define inline\nfloat computeShadowWithCSMPCF5(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=4.-3.*st;vec2 uvw1=vec2(7.);vec2 uvw2=1.+3.*st;vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z));shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z));shadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[0]),layer,uvDepth.z));shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z));shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z));shadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[1]),layer,uvDepth.z));shadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[2]),layer,uvDepth.z));shadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[2]),layer,uvDepth.z));shadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[2]),layer,uvDepth.z));shadow=shadow/144.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}\n#define inline\nfloat computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;float shadow=TEXTUREFUNC(shadowSampler,uvDepth,0.);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=3.-2.*st;vec2 uvw1=1.+2.*st;vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y;vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z),0.);shadow+=uvw1.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z),0.);shadow+=uvw0.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z),0.);shadow+=uvw1.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z),0.);shadow=shadow/16.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; \nuv+=0.5; \nvec2 st=fract(uv); \nvec2 base_uv=floor(uv)-0.5; \nbase_uv*=shadowMapSizeAndInverse.y; \nvec2 uvw0=4.-3.*st;vec2 uvw1=vec2(7.);vec2 uvw2=1.+3.*st;vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y;vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y;float shadow=0.;shadow+=uvw0.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z),0.);shadow+=uvw1.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z),0.);shadow+=uvw2.x*uvw0.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z),0.);shadow+=uvw0.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z),0.);shadow+=uvw1.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z),0.);shadow+=uvw2.x*uvw1.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z),0.);shadow+=uvw0.x*uvw2.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z),0.);shadow+=uvw1.x*uvw2.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z),0.);shadow+=uvw2.x*uvw2.y*TEXTUREFUNC(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z),0.);shadow=shadow/144.;shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\nconst vec3 PoissonSamplers32[64]=vec3[64](\nvec3(0.06407013,0.05409927,0.),\nvec3(0.7366577,0.5789394,0.),\nvec3(-0.6270542,-0.5320278,0.),\nvec3(-0.4096107,0.8411095,0.),\nvec3(0.6849564,-0.4990818,0.),\nvec3(-0.874181,-0.04579735,0.),\nvec3(0.9989998,0.0009880066,0.),\nvec3(-0.004920578,-0.9151649,0.),\nvec3(0.1805763,0.9747483,0.),\nvec3(-0.2138451,0.2635818,0.),\nvec3(0.109845,0.3884785,0.),\nvec3(0.06876755,-0.3581074,0.),\nvec3(0.374073,-0.7661266,0.),\nvec3(0.3079132,-0.1216763,0.),\nvec3(-0.3794335,-0.8271583,0.),\nvec3(-0.203878,-0.07715034,0.),\nvec3(0.5912697,0.1469799,0.),\nvec3(-0.88069,0.3031784,0.),\nvec3(0.5040108,0.8283722,0.),\nvec3(-0.5844124,0.5494877,0.),\nvec3(0.6017799,-0.1726654,0.),\nvec3(-0.5554981,0.1559997,0.),\nvec3(-0.3016369,-0.3900928,0.),\nvec3(-0.5550632,-0.1723762,0.),\nvec3(0.925029,0.2995041,0.),\nvec3(-0.2473137,0.5538505,0.),\nvec3(0.9183037,-0.2862392,0.),\nvec3(0.2469421,0.6718712,0.),\nvec3(0.3916397,-0.4328209,0.),\nvec3(-0.03576927,-0.6220032,0.),\nvec3(-0.04661255,0.7995201,0.),\nvec3(0.4402924,0.3640312,0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.),\nvec3(0.)\n);const vec3 PoissonSamplers64[64]=vec3[64](\nvec3(-0.613392,0.617481,0.),\nvec3(0.170019,-0.040254,0.),\nvec3(-0.299417,0.791925,0.),\nvec3(0.645680,0.493210,0.),\nvec3(-0.651784,0.717887,0.),\nvec3(0.421003,0.027070,0.),\nvec3(-0.817194,-0.271096,0.),\nvec3(-0.705374,-0.668203,0.),\nvec3(0.977050,-0.108615,0.),\nvec3(0.063326,0.142369,0.),\nvec3(0.203528,0.214331,0.),\nvec3(-0.667531,0.326090,0.),\nvec3(-0.098422,-0.295755,0.),\nvec3(-0.885922,0.215369,0.),\nvec3(0.566637,0.605213,0.),\nvec3(0.039766,-0.396100,0.),\nvec3(0.751946,0.453352,0.),\nvec3(0.078707,-0.715323,0.),\nvec3(-0.075838,-0.529344,0.),\nvec3(0.724479,-0.580798,0.),\nvec3(0.222999,-0.215125,0.),\nvec3(-0.467574,-0.405438,0.),\nvec3(-0.248268,-0.814753,0.),\nvec3(0.354411,-0.887570,0.),\nvec3(0.175817,0.382366,0.),\nvec3(0.487472,-0.063082,0.),\nvec3(-0.084078,0.898312,0.),\nvec3(0.488876,-0.783441,0.),\nvec3(0.470016,0.217933,0.),\nvec3(-0.696890,-0.549791,0.),\nvec3(-0.149693,0.605762,0.),\nvec3(0.034211,0.979980,0.),\nvec3(0.503098,-0.308878,0.),\nvec3(-0.016205,-0.872921,0.),\nvec3(0.385784,-0.393902,0.),\nvec3(-0.146886,-0.859249,0.),\nvec3(0.643361,0.164098,0.),\nvec3(0.634388,-0.049471,0.),\nvec3(-0.688894,0.007843,0.),\nvec3(0.464034,-0.188818,0.),\nvec3(-0.440840,0.137486,0.),\nvec3(0.364483,0.511704,0.),\nvec3(0.034028,0.325968,0.),\nvec3(0.099094,-0.308023,0.),\nvec3(0.693960,-0.366253,0.),\nvec3(0.678884,-0.204688,0.),\nvec3(0.001801,0.780328,0.),\nvec3(0.145177,-0.898984,0.),\nvec3(0.062655,-0.611866,0.),\nvec3(0.315226,-0.604297,0.),\nvec3(-0.780145,0.486251,0.),\nvec3(-0.371868,0.882138,0.),\nvec3(0.200476,0.494430,0.),\nvec3(-0.494552,-0.711051,0.),\nvec3(0.612476,0.705252,0.),\nvec3(-0.578845,-0.768792,0.),\nvec3(-0.772454,-0.090976,0.),\nvec3(0.504440,0.372295,0.),\nvec3(0.155736,0.065157,0.),\nvec3(0.391522,0.849605,0.),\nvec3(-0.620106,-0.328104,0.),\nvec3(0.789239,-0.419965,0.),\nvec3(-0.545396,0.538133,0.),\nvec3(-0.178564,-0.596057,0.)\n);\n#define inline\nfloat computeShadowWithCSMPCSS(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness)\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=clamp(ZINCLIP,0.,GREATEST_LESS_THAN_ONE);vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z);float blockerDepth=0.0;float sumBlockerDepth=0.0;float numBlocker=0.0;for (int i=0; i<searchTapCount; i ++) {blockerDepth=texture2D(depthSampler,vec3(uvDepth.xy+(lightSizeUV*lightSizeUVCorrection*shadowMapSizeInverse*PoissonSamplers32[i].xy),layer)).r;if (blockerDepth<depthMetric) {sumBlockerDepth+=blockerDepth;numBlocker++;}}\nfloat avgBlockerDepth=sumBlockerDepth/numBlocker;float AAOffset=shadowMapSizeInverse*10.;float penumbraRatio=((depthMetric-avgBlockerDepth)*depthCorrection+AAOffset);vec4 filterRadius=vec4(penumbraRatio*lightSizeUV*lightSizeUVCorrection*shadowMapSizeInverse,0.,0.);float random=getRand(vPositionFromLight.xy);float rotationAngle=random*3.1415926;vec2 rotationVector=vec2(cos(rotationAngle),sin(rotationAngle));float shadow=0.;for (int i=0; i<pcfTapCount; i++) {vec4 offset=vec4(poissonSamplers[i],0.);offset=vec4(offset.x*rotationVector.x-offset.y*rotationVector.y,offset.y*rotationVector.x+offset.x*rotationVector.y,0.,0.);shadow+=texture2D(shadowSampler,uvDepthLayer+offset*filterRadius);}\nshadow/=float(pcfTapCount);shadow=mix(shadow,1.,min((depthMetric-avgBlockerDepth)*depthCorrection*penumbraDarkness,1.));shadow=mix(darkness,1.,shadow);if (numBlocker<1.0) {return 1.0;}\nelse\n{return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}\n#define inline\nfloat computeShadowWithPCSS(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,highp sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers)\n{if (depthMetric>1.0 || depthMetric<0.0) {return 1.0;}\nelse\n{vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w;vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5));uvDepth.z=ZINCLIP;float blockerDepth=0.0;float sumBlockerDepth=0.0;float numBlocker=0.0;for (int i=0; i<searchTapCount; i ++) {blockerDepth=TEXTUREFUNC(depthSampler,uvDepth.xy+(lightSizeUV*shadowMapSizeInverse*PoissonSamplers32[i].xy),0.).r;if (blockerDepth<depthMetric) {sumBlockerDepth+=blockerDepth;numBlocker++;}}\nif (numBlocker<1.0) {return 1.0;}\nelse\n{float avgBlockerDepth=sumBlockerDepth/numBlocker;float AAOffset=shadowMapSizeInverse*10.;float penumbraRatio=((depthMetric-avgBlockerDepth)+AAOffset);float filterRadius=penumbraRatio*lightSizeUV*shadowMapSizeInverse;float random=getRand(vPositionFromLight.xy);float rotationAngle=random*3.1415926;vec2 rotationVector=vec2(cos(rotationAngle),sin(rotationAngle));float shadow=0.;for (int i=0; i<pcfTapCount; i++) {vec3 offset=poissonSamplers[i];offset=vec3(offset.x*rotationVector.x-offset.y*rotationVector.y,offset.y*rotationVector.x+offset.x*rotationVector.y,0.);shadow+=TEXTUREFUNC(shadowSampler,uvDepth+offset*filterRadius,0.);}\nshadow/=float(pcfTapCount);shadow=mix(shadow,1.,depthMetric-avgBlockerDepth);shadow=mix(darkness,1.,shadow);return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff);}}}\n#define inline\nfloat computeShadowWithPCSS16(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,highp sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\n{return computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,16,PoissonSamplers32);}\n#define inline\nfloat computeShadowWithPCSS32(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,highp sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\n{return computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,32,PoissonSamplers32);}\n#define inline\nfloat computeShadowWithPCSS64(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,highp sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff)\n{return computeShadowWithPCSS(vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,32,64,PoissonSamplers64);}\n#define inline\nfloat computeShadowWithCSMPCSS16(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness)\n{return computeShadowWithCSMPCSS(layer,vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,16,PoissonSamplers32,lightSizeUVCorrection,depthCorrection,penumbraDarkness);}\n#define inline\nfloat computeShadowWithCSMPCSS32(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness)\n{return computeShadowWithCSMPCSS(layer,vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,16,32,PoissonSamplers32,lightSizeUVCorrection,depthCorrection,penumbraDarkness);}\n#define inline\nfloat computeShadowWithCSMPCSS64(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness)\n{return computeShadowWithCSMPCSS(layer,vPositionFromLight,depthMetric,depthSampler,shadowSampler,shadowMapSizeInverse,lightSizeUV,darkness,frustumEdgeFalloff,32,64,PoissonSamplers64,lightSizeUVCorrection,depthCorrection,penumbraDarkness);}\n#endif\n#endif\n";n(7416).v.IncludesShadersStore[i]=t}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:4542 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4602.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4602],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4602],{6236:(e,n,t)=>{const i="fogVertex",r="#ifdef FOG\nvertexOutputs.vFogDistance=(scene.view*worldPos).xyz;\n#endif\n";t(7416).v.IncludesShadersStoreWGSL[i]=r},5472:(e,n,t)=>{const i="fogVertexDeclaration",r="#ifdef FOG\nvarying vFogDistance: vec3f;\n#endif\n";t(7416).v.IncludesShadersStoreWGSL[i]=r},850:(e,n,t)=>{const i="vertexColorMixing",r="#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvertexOutputs.vColor=vec4f(1.0);\n#ifdef VERTEXCOLOR\n#ifdef VERTEXALPHA\nvertexOutputs.vColor*=vertexInputs.color;\n#else\nvertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*vertexInputs.color.rgb,vertexOutputs.vColor.a);\n#endif\n#endif\n#ifdef INSTANCESCOLOR\nvertexOutputs.vColor*=vertexInputs.instanceColor;\n#endif\n#endif\n";t(7416).v.IncludesShadersStoreWGSL[i]=r},4602:(e,n,t)=>{t.r(n),t.d(n,{colorVertexShaderWGSL:()=>d});var i=t(7416);t(7762),t(1990),t(870),t(5472),t(2724),t(9413),t(8333),t(8439),t(6601),t(6236),t(850);const r="colorVertexShader",o="attribute position: vec3f;\n#ifdef VERTEXCOLOR\nattribute color: vec4f;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#ifdef FOG\nuniform view: mat4x4f;\n#endif\n#include<instancesDeclaration>\nuniform viewProjection: mat4x4f;\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vColor: vec4f;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvar worldPos: vec4f=finalWorld* vec4f(input.position,1.0);vertexOutputs.position=uniforms.viewProjection*worldPos;\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<vertexColorMixing>\n#define CUSTOM_VERTEX_MAIN_END\n}";i.v.ShadersStoreWGSL[r]=o;const d={name:r,shader:o}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4661.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4661],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4661],{7470:(e,n,i)=>{const t="logDepthDeclaration",r="#ifdef LOGARITHMICDEPTH\nuniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},7350:(e,n,i)=>{const t="logDepthVertex",r="#ifdef LOGARITHMICDEPTH\nvertexOutputs.vFragmentDepth=1.0+vertexOutputs.position.w;vertexOutputs.position.z=log2(max(0.000001,vertexOutputs.vFragmentDepth))*uniforms.logarithmicDepthConstant;\n#endif\n";i(7416).v.IncludesShadersStoreWGSL[t]=r},4661:(e,n,i)=>{i.r(n),i.d(n,{lineVertexShaderWGSL:()=>a});var t=i(7416);i(2724),i(870),i(7761),i(2),i(7470),i(9413),i(6601),i(7350);const r="lineVertexShader",o="#define ADDITIONAL_VERTEX_DECLARATION\n#include<instancesDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute position: vec3f;attribute normal: vec4f;uniform width: f32;uniform aspectRatio: f32;\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\nvar worldViewProjection: mat4x4f=scene.viewProjection*finalWorld;var viewPosition: vec4f=worldViewProjection* vec4f(input.position,1.0);var viewPositionNext: vec4f=worldViewProjection* vec4f(input.normal.xyz,1.0);var currentScreen: vec2f=viewPosition.xy/viewPosition.w;var nextScreen: vec2f=viewPositionNext.xy/viewPositionNext.w;currentScreen=vec2f(currentScreen.x*uniforms.aspectRatio,currentScreen.y);nextScreen=vec2f(nextScreen.x*uniforms.aspectRatio,nextScreen.y);var dir: vec2f=normalize(nextScreen-currentScreen);var normalDir: vec2f= vec2f(-dir.y,dir.x);normalDir*=uniforms.width/2.0;normalDir=vec2f(normalDir.x/uniforms.aspectRatio,normalDir.y);var offset: vec4f= vec4f(normalDir*input.normal.w,0.0,0.0);vertexOutputs.position=viewPosition+offset;\n#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)\nvar worldPos: vec4f=finalWorld*vec4f(input.position,1.0);\n#include<clipPlaneVertex>\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}";t.v.ShadersStoreWGSL[r]=o;const a={name:r,shader:o}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4669.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4669],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4669],{4669:(e,r,n)=>{n.r(r),n.d(r,{depthBoxBlurPixelShader:()=>o});const t="depthBoxBlurPixelShader",i="varying vec2 vUV;uniform sampler2D textureSampler;uniform vec2 screenSize;\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec4 colorDepth=vec4(0.0);for (int x=-OFFSET; x<=OFFSET; x++)\nfor (int y=-OFFSET; y<=OFFSET; y++)\ncolorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize);gl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1)));}";n(7416).v.ShadersStore[t]=i;const o={name:t,shader:i}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4711.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4711],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4711],{4711:(a,e,r)=>{r.r(e),r.d(e,{fxaaPixelShaderWGSL:()=>n});const l="fxaaPixelShader",m="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;uniform texelSize: vec2f;varying sampleCoordS: vec2f;varying sampleCoordE: vec2f;varying sampleCoordN: vec2f;varying sampleCoordW: vec2f;varying sampleCoordNW: vec2f;varying sampleCoordSE: vec2f;varying sampleCoordNE: vec2f;varying sampleCoordSW: vec2f;const fxaaQualitySubpix: f32=1.0;const fxaaQualityEdgeThreshold: f32=0.166;const fxaaQualityEdgeThresholdMin: f32=0.0833;const kLumaCoefficients: vec3f= vec3f(0.2126,0.7152,0.0722);fn FxaaLuma(rgba: vec4f)->f32 {return dot(rgba.rgb,kLumaCoefficients);} \n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var posM: vec2f;posM.x=input.vUV.x;posM.y=input.vUV.y;var rgbyM: vec4f=textureSampleLevel(textureSampler,textureSamplerSampler,input.vUV,0.0);var lumaM: f32=FxaaLuma(rgbyM);var lumaS: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordS,0.0));var lumaE: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordE,0.0));var lumaN: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordN,0.0));var lumaW: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordW,0.0));var maxSM: f32=max(lumaS,lumaM);var minSM: f32=min(lumaS,lumaM);var maxESM: f32=max(lumaE,maxSM);var minESM: f32=min(lumaE,minSM);var maxWN: f32=max(lumaN,lumaW);var minWN: f32=min(lumaN,lumaW);var rangeMax: f32=max(maxWN,maxESM);var rangeMin: f32=min(minWN,minESM);var rangeMaxScaled: f32=rangeMax*fxaaQualityEdgeThreshold;var range: f32=rangeMax-rangeMin;var rangeMaxClamped: f32=max(fxaaQualityEdgeThresholdMin,rangeMaxScaled);\n#ifndef MALI\nif(range<rangeMaxClamped) \n{fragmentOutputs.color=rgbyM;return fragmentOutputs;}\n#endif\nvar lumaNW: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordNW,0.0));var lumaSE: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordSE,0.0));var lumaNE: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordNE,0.0));var lumaSW: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,input.sampleCoordSW,0.0));var lumaNS: f32=lumaN+lumaS;var lumaWE: f32=lumaW+lumaE;var subpixRcpRange: f32=1.0/range;var subpixNSWE: f32=lumaNS+lumaWE;var edgeHorz1: f32=(-2.0*lumaM)+lumaNS;var edgeVert1: f32=(-2.0*lumaM)+lumaWE;var lumaNESE: f32=lumaNE+lumaSE;var lumaNWNE: f32=lumaNW+lumaNE;var edgeHorz2: f32=(-2.0*lumaE)+lumaNESE;var edgeVert2: f32=(-2.0*lumaN)+lumaNWNE;var lumaNWSW: f32=lumaNW+lumaSW;var lumaSWSE: f32=lumaSW+lumaSE;var edgeHorz4: f32=(abs(edgeHorz1)*2.0)+abs(edgeHorz2);var edgeVert4: f32=(abs(edgeVert1)*2.0)+abs(edgeVert2);var edgeHorz3: f32=(-2.0*lumaW)+lumaNWSW;var edgeVert3: f32=(-2.0*lumaS)+lumaSWSE;var edgeHorz: f32=abs(edgeHorz3)+edgeHorz4;var edgeVert: f32=abs(edgeVert3)+edgeVert4;var subpixNWSWNESE: f32=lumaNWSW+lumaNESE;var lengthSign: f32=uniforms.texelSize.x;var horzSpan: bool=edgeHorz>=edgeVert;var subpixA: f32=subpixNSWE*2.0+subpixNWSWNESE;if (!horzSpan)\n{lumaN=lumaW;}\nif (!horzSpan) \n{lumaS=lumaE;}\nif (horzSpan) \n{lengthSign=uniforms.texelSize.y;}\nvar subpixB: f32=(subpixA*(1.0/12.0))-lumaM;var gradientN: f32=lumaN-lumaM;var gradientS: f32=lumaS-lumaM;var lumaNN: f32=lumaN+lumaM;var lumaSS: f32=lumaS+lumaM;var pairN: bool=abs(gradientN)>=abs(gradientS);var gradient: f32=max(abs(gradientN),abs(gradientS));if (pairN)\n{lengthSign=-lengthSign;}\nvar subpixC: f32=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0);var posB: vec2f;posB.x=posM.x;posB.y=posM.y;var offNP: vec2f;offNP.x=select(uniforms.texelSize.x,0.0,(!horzSpan));offNP.y=select(uniforms.texelSize.y,0.0,(horzSpan));if (!horzSpan) \n{posB.x+=lengthSign*0.5;}\nif (horzSpan)\n{posB.y+=lengthSign*0.5;}\nvar posN: vec2f;posN.x=posB.x-offNP.x*1.5;posN.y=posB.y-offNP.y*1.5;var posP: vec2f;posP.x=posB.x+offNP.x*1.5;posP.y=posB.y+offNP.y*1.5;var subpixD: f32=((-2.0)*subpixC)+3.0;var lumaEndN: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,posN,0.0));var subpixE: f32=subpixC*subpixC;var lumaEndP: f32=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,posP,0.0));if (!pairN) \n{lumaNN=lumaSS;}\nvar gradientScaled: f32=gradient*1.0/4.0;var lumaMM: f32=lumaM-lumaNN*0.5;var subpixF: f32=subpixD*subpixE;var lumaMLTZero: bool=lumaMM<0.0;lumaEndN-=lumaNN*0.5;lumaEndP-=lumaNN*0.5;var doneN: bool=abs(lumaEndN)>=gradientScaled;var doneP: bool=abs(lumaEndP)>=gradientScaled;if (!doneN) \n{posN.x-=offNP.x*3.0;}\nif (!doneN) \n{posN.y-=offNP.y*3.0;}\nvar doneNP: bool=(!doneN) || (!doneP);if (!doneP) \n{posP.x+=offNP.x*3.0;}\nif (!doneP)\n{posP.y+=offNP.y*3.0;}\nif (doneNP)\n{if (!doneN) {lumaEndN=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,posN.xy,0.0));}\nif (!doneP) {lumaEndP=FxaaLuma(textureSampleLevel(textureSampler,textureSamplerSampler,posP.xy,0.0));}\nif (!doneN) {lumaEndN=lumaEndN-lumaNN*0.5;}\nif (!doneP) {lumaEndP=lumaEndP-lumaNN*0.5;}\ndoneN=abs(lumaEndN)>=gradientScaled;doneP=abs(lumaEndP)>=gradientScaled;if (!doneN) {posN.x-=offNP.x*12.0;}\nif (!doneN) {posN.y-=offNP.y*12.0;}\ndoneNP=(!doneN) || (!doneP);if (!doneP) {posP.x+=offNP.x*12.0;}\nif (!doneP) {posP.y+=offNP.y*12.0;}}\nvar dstN: f32=posM.x-posN.x;var dstP: f32=posP.x-posM.x;if (!horzSpan)\n{dstN=posM.y-posN.y;}\nif (!horzSpan) \n{dstP=posP.y-posM.y;}\nvar goodSpanN: bool=(lumaEndN<0.0) != lumaMLTZero;var spanLength: f32=(dstP+dstN);var goodSpanP: bool=(lumaEndP<0.0) != lumaMLTZero;var spanLengthRcp: f32=1.0/spanLength;var directionN: bool=dstN<dstP;var dst: f32=min(dstN,dstP);var goodSpan: bool=select(goodSpanP,goodSpanN,directionN);var subpixG: f32=subpixF*subpixF;var pixelOffset: f32=(dst*(-spanLengthRcp))+0.5;var subpixH: f32=subpixG*fxaaQualitySubpix;var pixelOffsetGood: f32=select(0.0,pixelOffset,goodSpan);var pixelOffsetSubpix: f32=max(pixelOffsetGood,subpixH);if (!horzSpan)\n{posM.x+=pixelOffsetSubpix*lengthSign;}\nif (horzSpan)\n{posM.y+=pixelOffsetSubpix*lengthSign;}\n#ifdef MALI\nif(range<rangeMaxClamped) \n{fragmentOutputs.color=rgbyM;}\nelse\n{fragmentOutputs.color=textureSampleLevel(textureSampler,textureSamplerSampler,posM,0.0);}\n#else\nfragmentOutputs.color=textureSampleLevel(textureSampler,textureSamplerSampler,posM,0.0);\n#endif\n}";r(7416).v.ShadersStoreWGSL[l]=m;const n={name:l,shader:m}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 4823.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4823],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[4823],{7470:(e,n,t)=>{const r="logDepthDeclaration",a="#ifdef LOGARITHMICDEPTH\nuniform logarithmicDepthConstant: f32;varying vFragmentDepth: f32;\n#endif\n";t(7416).v.IncludesShadersStoreWGSL[r]=a},954:(e,n,t)=>{const r="logDepthFragment",a="#ifdef LOGARITHMICDEPTH\nfragmentOutputs.fragDepth=log2(fragmentInputs.vFragmentDepth)*uniforms.logarithmicDepthConstant*0.5;\n#endif\n";t(7416).v.IncludesShadersStoreWGSL[r]=a},4823:(e,n,t)=>{t.r(n),t.d(n,{linePixelShaderWGSL:()=>l});var r=t(7416);t(7652),t(7470),t(954),t(3665);const a="linePixelShader",i="#include<clipPlaneFragmentDeclaration>\nuniform color: vec4f;\n#include<logDepthDeclaration>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<logDepthFragment>\n#include<clipPlaneFragment>\nfragmentOutputs.color=uniforms.color;\n#define CUSTOM_FRAGMENT_MAIN_END\n}";r.v.ShadersStoreWGSL[a]=i;const l={name:a,shader:i}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 5462.real-time-viewer.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5462],{
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewer=self.webpackChunkCrystaldesignRealTimeViewer||[]).push([[5462],{5462:(e,i,n)=>{n.r(i),n.d(i,{hdrFilteringVertexShader:()=>o});const r="hdrFilteringVertexShader",t="attribute vec2 position;varying vec3 direction;uniform vec3 up;uniform vec3 right;uniform vec3 front;\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nmat3 view=mat3(up,right,front);direction=view*vec3(position,1.0);gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";n(7416).v.ShadersStore[r]=t;const o={name:r,shader:t}}}]);
|