@babylonjs/viewer 7.23.0-alpha → 7.23.0
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/configuration/configuration.d.ts +107 -0
- package/configuration/configuration.js +16 -0
- package/configuration/configuration.js.map +1 -0
- package/configuration/configurationCompatibility.d.ts +8 -0
- package/configuration/configurationCompatibility.js +66 -0
- package/configuration/configurationCompatibility.js.map +1 -0
- package/configuration/configurationContainer.d.ts +10 -0
- package/configuration/configurationContainer.js +10 -0
- package/configuration/configurationContainer.js.map +1 -0
- package/configuration/globals.d.ts +6 -0
- package/configuration/globals.js +18 -0
- package/configuration/globals.js.map +1 -0
- package/configuration/index.d.ts +2 -0
- package/configuration/index.js +4 -0
- package/configuration/index.js.map +1 -0
- package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
- package/configuration/interfaces/cameraConfiguration.js +2 -0
- package/configuration/interfaces/cameraConfiguration.js.map +1 -0
- package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
- package/configuration/interfaces/colorGradingConfiguration.js +2 -0
- package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
- package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
- package/configuration/interfaces/environmentMapConfiguration.js +2 -0
- package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
- package/configuration/interfaces/groundConfiguration.d.ts +24 -0
- package/configuration/interfaces/groundConfiguration.js +2 -0
- package/configuration/interfaces/groundConfiguration.js.map +1 -0
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
- package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
- package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
- package/configuration/interfaces/index.d.ts +15 -0
- package/configuration/interfaces/index.js +16 -0
- package/configuration/interfaces/index.js.map +1 -0
- package/configuration/interfaces/lightConfiguration.d.ts +60 -0
- package/configuration/interfaces/lightConfiguration.js +2 -0
- package/configuration/interfaces/lightConfiguration.js.map +1 -0
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
- package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
- package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
- package/configuration/interfaces/modelConfiguration.d.ts +65 -0
- package/configuration/interfaces/modelConfiguration.js +2 -0
- package/configuration/interfaces/modelConfiguration.js.map +1 -0
- package/configuration/interfaces/observersConfiguration.d.ts +5 -0
- package/configuration/interfaces/observersConfiguration.js +2 -0
- package/configuration/interfaces/observersConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
- package/configuration/interfaces/sceneConfiguration.js +2 -0
- package/configuration/interfaces/sceneConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
- package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
- package/configuration/interfaces/skyboxConfiguration.js +2 -0
- package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
- package/configuration/interfaces/templateConfiguration.d.ts +67 -0
- package/configuration/interfaces/templateConfiguration.js +2 -0
- package/configuration/interfaces/templateConfiguration.js.map +1 -0
- package/configuration/interfaces/vrConfiguration.d.ts +16 -0
- package/configuration/interfaces/vrConfiguration.js +2 -0
- package/configuration/interfaces/vrConfiguration.js.map +1 -0
- package/configuration/loader.d.ts +4 -0
- package/configuration/loader.js +17 -0
- package/configuration/loader.js.map +1 -0
- package/configuration/mappers.d.ts +43 -0
- package/configuration/mappers.js +192 -0
- package/configuration/mappers.js.map +1 -0
- package/configuration/renderOnlyLoader.d.ts +33 -0
- package/configuration/renderOnlyLoader.js +162 -0
- package/configuration/renderOnlyLoader.js.map +1 -0
- package/configuration/types/default.d.ts +6 -0
- package/configuration/types/default.js +121 -0
- package/configuration/types/default.js.map +1 -0
- package/configuration/types/environmentMap.d.ts +5 -0
- package/configuration/types/environmentMap.js +14 -0
- package/configuration/types/environmentMap.js.map +1 -0
- package/configuration/types/extended.d.ts +6 -0
- package/configuration/types/extended.js +317 -0
- package/configuration/types/extended.js.map +1 -0
- package/configuration/types/index.d.ts +14 -0
- package/configuration/types/index.js +51 -0
- package/configuration/types/index.js.map +1 -0
- package/configuration/types/minimal.d.ts +6 -0
- package/configuration/types/minimal.js +43 -0
- package/configuration/types/minimal.js.map +1 -0
- package/configuration/types/renderOnlyDefault.d.ts +30 -0
- package/configuration/types/renderOnlyDefault.js +31 -0
- package/configuration/types/renderOnlyDefault.js.map +1 -0
- package/configuration/types/shadowLight.d.ts +9 -0
- package/configuration/types/shadowLight.js +64 -0
- package/configuration/types/shadowLight.js.map +1 -0
- package/helper/index.d.ts +29 -0
- package/helper/index.js +66 -0
- package/helper/index.js.map +1 -0
- package/index.d.ts +30 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/initializer.d.ts +11 -0
- package/initializer.js +35 -0
- package/initializer.js.map +1 -0
- package/interfaces.d.ts +5 -0
- package/interfaces.js +7 -0
- package/interfaces.js.map +1 -0
- package/labs/environmentSerializer.d.ts +126 -0
- package/labs/environmentSerializer.js +191 -0
- package/labs/environmentSerializer.js.map +1 -0
- package/labs/texture.d.ts +183 -0
- package/labs/texture.js +351 -0
- package/labs/texture.js.map +1 -0
- package/labs/viewerLabs.d.ts +51 -0
- package/labs/viewerLabs.js +134 -0
- package/labs/viewerLabs.js.map +1 -0
- package/loader/modelLoader.d.ts +56 -0
- package/loader/modelLoader.js +199 -0
- package/loader/modelLoader.js.map +1 -0
- package/loader/plugins/applyMaterialConfig.d.ts +12 -0
- package/loader/plugins/applyMaterialConfig.js +16 -0
- package/loader/plugins/applyMaterialConfig.js.map +1 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
- package/loader/plugins/index.d.ts +19 -0
- package/loader/plugins/index.js +44 -0
- package/loader/plugins/index.js.map +1 -0
- package/loader/plugins/loaderPlugin.d.ts +24 -0
- package/loader/plugins/loaderPlugin.js +2 -0
- package/loader/plugins/loaderPlugin.js.map +1 -0
- package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
- package/loader/plugins/msftLodLoaderPlugin.js +21 -0
- package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
- package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
- package/loader/plugins/telemetryLoaderPlugin.js +36 -0
- package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
- package/managers/observablesManager.d.ts +66 -0
- package/managers/observablesManager.js +35 -0
- package/managers/observablesManager.js.map +1 -0
- package/managers/sceneManager.d.ts +245 -0
- package/managers/sceneManager.js +1375 -0
- package/managers/sceneManager.js.map +1 -0
- package/managers/telemetryManager.d.ts +78 -0
- package/managers/telemetryManager.js +117 -0
- package/managers/telemetryManager.js.map +1 -0
- package/model/modelAnimation.d.ts +215 -0
- package/model/modelAnimation.js +237 -0
- package/model/modelAnimation.js.map +1 -0
- package/model/viewerModel.d.ts +233 -0
- package/model/viewerModel.js +673 -0
- package/model/viewerModel.js.map +1 -0
- package/optimizer/custom/extended.d.ts +13 -0
- package/optimizer/custom/extended.js +101 -0
- package/optimizer/custom/extended.js.map +1 -0
- package/optimizer/custom/index.d.ts +9 -0
- package/optimizer/custom/index.js +26 -0
- package/optimizer/custom/index.js.map +1 -0
- package/package.json +27 -17
- package/readme.md +21 -35
- package/renderOnlyIndex.d.ts +11 -0
- package/renderOnlyIndex.js +18 -0
- package/renderOnlyIndex.js.map +1 -0
- package/templating/eventManager.d.ts +35 -0
- package/templating/eventManager.js +66 -0
- package/templating/eventManager.js.map +1 -0
- package/templating/plugins/hdButtonPlugin.d.ts +9 -0
- package/templating/plugins/hdButtonPlugin.js +21 -0
- package/templating/plugins/hdButtonPlugin.js.map +1 -0
- package/templating/plugins/printButton.d.ts +9 -0
- package/templating/plugins/printButton.js +40 -0
- package/templating/plugins/printButton.js.map +1 -0
- package/templating/templateManager.d.ts +197 -0
- package/templating/templateManager.js +561 -0
- package/templating/templateManager.js.map +1 -0
- package/templating/viewerTemplatePlugin.d.ts +21 -0
- package/templating/viewerTemplatePlugin.js +69 -0
- package/templating/viewerTemplatePlugin.js.map +1 -0
- package/viewer/defaultViewer.d.ts +130 -0
- package/viewer/defaultViewer.js +675 -0
- package/viewer/defaultViewer.js.map +1 -0
- package/viewer/renderOnlyViewer.d.ts +9 -0
- package/viewer/renderOnlyViewer.js +46 -0
- package/viewer/renderOnlyViewer.js.map +1 -0
- package/viewer/viewer.d.ts +258 -0
- package/viewer/viewer.js +783 -0
- package/viewer/viewer.js.map +1 -0
- package/viewer/viewerManager.d.ts +58 -0
- package/viewer/viewerManager.js +91 -0
- package/viewer/viewerManager.js.map +1 -0
- package/viewer/viewerWithTemplate.d.ts +9 -0
- package/viewer/viewerWithTemplate.js +20 -0
- package/viewer/viewerWithTemplate.js.map +1 -0
- package/dist/babylon-viewer.esm.js +0 -2
- package/dist/babylon-viewer.esm.js.map +0 -1
- package/dist/babylon-viewer.esm.min.js +0 -2
- package/dist/babylon-viewer.esm.min.js.map +0 -1
- package/dist/chunks/basisTextureLoader-BnIeLUi5.esm.min.js +0 -2
- package/dist/chunks/basisTextureLoader-BnIeLUi5.esm.min.js.map +0 -1
- package/dist/chunks/basisTextureLoader-D5DAa_qR.esm.js +0 -600
- package/dist/chunks/basisTextureLoader-D5DAa_qR.esm.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-D9xNsYAT.esm.min.js +0 -2
- package/dist/chunks/ddsTextureLoader-D9xNsYAT.esm.min.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-DCv39Yn8.esm.js +0 -87
- package/dist/chunks/ddsTextureLoader-DCv39Yn8.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-Cmuugxf1.esm.min.js +0 -2
- package/dist/chunks/envTextureLoader-Cmuugxf1.esm.min.js.map +0 -1
- package/dist/chunks/envTextureLoader-Dl0xiO1G.esm.js +0 -62
- package/dist/chunks/envTextureLoader-Dl0xiO1G.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-C0UEUMfH.esm.js +0 -1682
- package/dist/chunks/exrTextureLoader-C0UEUMfH.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-DVZGHvAz.esm.min.js +0 -2
- package/dist/chunks/exrTextureLoader-DVZGHvAz.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-BM271mLj.esm.min.js +0 -2
- package/dist/chunks/hdrTextureLoader-BM271mLj.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-CrHh5vTV.esm.js +0 -252
- package/dist/chunks/hdrTextureLoader-CrHh5vTV.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-BQ8X1piK.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-BQ8X1piK.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-CUX6uz_w.esm.js +0 -108
- package/dist/chunks/helperFunctions-CUX6uz_w.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-ChWwJuKv.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-ChWwJuKv.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-DpMCqZKL.esm.js +0 -80
- package/dist/chunks/helperFunctions-DpMCqZKL.esm.js.map +0 -1
- package/dist/chunks/index-DHuuBhpP.esm.js +0 -102146
- package/dist/chunks/index-DHuuBhpP.esm.js.map +0 -1
- package/dist/chunks/index-EA8kJjBu.esm.min.js +0 -56
- package/dist/chunks/index-EA8kJjBu.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-BRR5FQro.esm.min.js +0 -2
- package/dist/chunks/ktxTextureLoader-BRR5FQro.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-gZQU7w7m.esm.js +0 -813
- package/dist/chunks/ktxTextureLoader-gZQU7w7m.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-B1MaqbwG.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-B1MaqbwG.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-B2UkQWK5.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-B2UkQWK5.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-COhUDa1N.esm.js +0 -73
- package/dist/chunks/logDepthDeclaration-COhUDa1N.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CojhsbFY.esm.js +0 -76
- package/dist/chunks/logDepthDeclaration-CojhsbFY.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-BNKAdmAy.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-BNKAdmAy.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-CDiei_Sn.esm.js +0 -15
- package/dist/chunks/pass.fragment-CDiei_Sn.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-BN71FgFx.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-BN71FgFx.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-BvCEmvwh.esm.js +0 -4530
- package/dist/chunks/pbr.fragment-BvCEmvwh.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-DU4hy3T_.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-DU4hy3T_.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-QxF1RFoh.esm.js +0 -4323
- package/dist/chunks/pbr.fragment-QxF1RFoh.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-62J9fbA6.esm.js +0 -932
- package/dist/chunks/pbr.vertex-62J9fbA6.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-C8vOdMd6.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-C8vOdMd6.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-Cp4yABqq.esm.js +0 -809
- package/dist/chunks/pbr.vertex-Cp4yABqq.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-DPPPQSbX.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-DPPPQSbX.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-5WWqPw1s.esm.js +0 -20
- package/dist/chunks/postprocess.vertex-5WWqPw1s.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-DzqXlss5.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-DzqXlss5.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-BdggM8VZ.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-BdggM8VZ.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-Bpslxg4R.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-Bpslxg4R.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-By7Rc7Xz.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-By7Rc7Xz.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-CnUoEV03.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-CnUoEV03.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-BBl79-3e.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-BBl79-3e.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-BGkuZmHn.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-BGkuZmHn.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-LUPpF87m.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-LUPpF87m.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-PJDNuVns.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-PJDNuVns.esm.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-CccJYauf.esm.min.js +0 -2
- package/dist/chunks/tgaTextureLoader-CccJYauf.esm.min.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-DdDpL5u3.esm.js +0 -349
- package/dist/chunks/tgaTextureLoader-DdDpL5u3.esm.js.map +0 -1
- package/lib/index.d.ts +0 -237
- package/lib/index.js +0 -869
- package/lib/index.js.map +0 -1
|
@@ -1,932 +0,0 @@
|
|
|
1
|
-
import { S as ShaderStore } from './index-DHuuBhpP.esm.js';
|
|
2
|
-
import './logDepthDeclaration-CojhsbFY.esm.js';
|
|
3
|
-
import './helperFunctions-CUX6uz_w.esm.js';
|
|
4
|
-
|
|
5
|
-
// Do not edit.
|
|
6
|
-
const name$t = "decalVertexDeclaration";
|
|
7
|
-
const shader$t = `#ifdef DECAL
|
|
8
|
-
uniform vec4 vDecalInfos;uniform mat4 decalMatrix;
|
|
9
|
-
#endif
|
|
10
|
-
`;
|
|
11
|
-
// Sideeffect
|
|
12
|
-
ShaderStore.IncludesShadersStore[name$t] = shader$t;
|
|
13
|
-
|
|
14
|
-
// Do not edit.
|
|
15
|
-
const name$s = "pbrVertexDeclaration";
|
|
16
|
-
const shader$s = `uniform mat4 view;uniform mat4 viewProjection;
|
|
17
|
-
#ifdef ALBEDO
|
|
18
|
-
uniform mat4 albedoMatrix;uniform vec2 vAlbedoInfos;
|
|
19
|
-
#endif
|
|
20
|
-
#ifdef AMBIENT
|
|
21
|
-
uniform mat4 ambientMatrix;uniform vec4 vAmbientInfos;
|
|
22
|
-
#endif
|
|
23
|
-
#ifdef OPACITY
|
|
24
|
-
uniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;
|
|
25
|
-
#endif
|
|
26
|
-
#ifdef EMISSIVE
|
|
27
|
-
uniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix;
|
|
28
|
-
#endif
|
|
29
|
-
#ifdef LIGHTMAP
|
|
30
|
-
uniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;
|
|
31
|
-
#endif
|
|
32
|
-
#ifdef REFLECTIVITY
|
|
33
|
-
uniform vec3 vReflectivityInfos;uniform mat4 reflectivityMatrix;
|
|
34
|
-
#endif
|
|
35
|
-
#ifdef METALLIC_REFLECTANCE
|
|
36
|
-
uniform vec2 vMetallicReflectanceInfos;uniform mat4 metallicReflectanceMatrix;
|
|
37
|
-
#endif
|
|
38
|
-
#ifdef REFLECTANCE
|
|
39
|
-
uniform vec2 vReflectanceInfos;uniform mat4 reflectanceMatrix;
|
|
40
|
-
#endif
|
|
41
|
-
#ifdef MICROSURFACEMAP
|
|
42
|
-
uniform vec2 vMicroSurfaceSamplerInfos;uniform mat4 microSurfaceSamplerMatrix;
|
|
43
|
-
#endif
|
|
44
|
-
#ifdef BUMP
|
|
45
|
-
uniform vec3 vBumpInfos;uniform mat4 bumpMatrix;
|
|
46
|
-
#endif
|
|
47
|
-
#ifdef POINTSIZE
|
|
48
|
-
uniform float pointSize;
|
|
49
|
-
#endif
|
|
50
|
-
#ifdef REFLECTION
|
|
51
|
-
uniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;
|
|
52
|
-
#endif
|
|
53
|
-
#ifdef CLEARCOAT
|
|
54
|
-
#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS)
|
|
55
|
-
uniform vec4 vClearCoatInfos;
|
|
56
|
-
#endif
|
|
57
|
-
#ifdef CLEARCOAT_TEXTURE
|
|
58
|
-
uniform mat4 clearCoatMatrix;
|
|
59
|
-
#endif
|
|
60
|
-
#ifdef CLEARCOAT_TEXTURE_ROUGHNESS
|
|
61
|
-
uniform mat4 clearCoatRoughnessMatrix;
|
|
62
|
-
#endif
|
|
63
|
-
#ifdef CLEARCOAT_BUMP
|
|
64
|
-
uniform vec2 vClearCoatBumpInfos;uniform mat4 clearCoatBumpMatrix;
|
|
65
|
-
#endif
|
|
66
|
-
#ifdef CLEARCOAT_TINT_TEXTURE
|
|
67
|
-
uniform vec2 vClearCoatTintInfos;uniform mat4 clearCoatTintMatrix;
|
|
68
|
-
#endif
|
|
69
|
-
#endif
|
|
70
|
-
#ifdef IRIDESCENCE
|
|
71
|
-
#if defined(IRIDESCENCE_TEXTURE) || defined(IRIDESCENCE_THICKNESS_TEXTURE)
|
|
72
|
-
uniform vec4 vIridescenceInfos;
|
|
73
|
-
#endif
|
|
74
|
-
#ifdef IRIDESCENCE_TEXTURE
|
|
75
|
-
uniform mat4 iridescenceMatrix;
|
|
76
|
-
#endif
|
|
77
|
-
#ifdef IRIDESCENCE_THICKNESS_TEXTURE
|
|
78
|
-
uniform mat4 iridescenceThicknessMatrix;
|
|
79
|
-
#endif
|
|
80
|
-
#endif
|
|
81
|
-
#ifdef ANISOTROPIC
|
|
82
|
-
#ifdef ANISOTROPIC_TEXTURE
|
|
83
|
-
uniform vec2 vAnisotropyInfos;uniform mat4 anisotropyMatrix;
|
|
84
|
-
#endif
|
|
85
|
-
#endif
|
|
86
|
-
#ifdef SHEEN
|
|
87
|
-
#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS)
|
|
88
|
-
uniform vec4 vSheenInfos;
|
|
89
|
-
#endif
|
|
90
|
-
#ifdef SHEEN_TEXTURE
|
|
91
|
-
uniform mat4 sheenMatrix;
|
|
92
|
-
#endif
|
|
93
|
-
#ifdef SHEEN_TEXTURE_ROUGHNESS
|
|
94
|
-
uniform mat4 sheenRoughnessMatrix;
|
|
95
|
-
#endif
|
|
96
|
-
#endif
|
|
97
|
-
#ifdef SUBSURFACE
|
|
98
|
-
#ifdef SS_REFRACTION
|
|
99
|
-
uniform vec4 vRefractionInfos;uniform mat4 refractionMatrix;
|
|
100
|
-
#endif
|
|
101
|
-
#ifdef SS_THICKNESSANDMASK_TEXTURE
|
|
102
|
-
uniform vec2 vThicknessInfos;uniform mat4 thicknessMatrix;
|
|
103
|
-
#endif
|
|
104
|
-
#ifdef SS_REFRACTIONINTENSITY_TEXTURE
|
|
105
|
-
uniform vec2 vRefractionIntensityInfos;uniform mat4 refractionIntensityMatrix;
|
|
106
|
-
#endif
|
|
107
|
-
#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE
|
|
108
|
-
uniform vec2 vTranslucencyIntensityInfos;uniform mat4 translucencyIntensityMatrix;
|
|
109
|
-
#endif
|
|
110
|
-
#ifdef SS_TRANSLUCENCYCOLOR_TEXTURE
|
|
111
|
-
uniform vec2 vTranslucencyColorInfos;uniform mat4 translucencyColorMatrix;
|
|
112
|
-
#endif
|
|
113
|
-
#endif
|
|
114
|
-
#ifdef NORMAL
|
|
115
|
-
#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
|
|
116
|
-
#ifdef USESPHERICALFROMREFLECTIONMAP
|
|
117
|
-
#ifdef SPHERICAL_HARMONICS
|
|
118
|
-
uniform vec3 vSphericalL00;uniform vec3 vSphericalL1_1;uniform vec3 vSphericalL10;uniform vec3 vSphericalL11;uniform vec3 vSphericalL2_2;uniform vec3 vSphericalL2_1;uniform vec3 vSphericalL20;uniform vec3 vSphericalL21;uniform vec3 vSphericalL22;
|
|
119
|
-
#else
|
|
120
|
-
uniform vec3 vSphericalX;uniform vec3 vSphericalY;uniform vec3 vSphericalZ;uniform vec3 vSphericalXX_ZZ;uniform vec3 vSphericalYY_ZZ;uniform vec3 vSphericalZZ;uniform vec3 vSphericalXY;uniform vec3 vSphericalYZ;uniform vec3 vSphericalZX;
|
|
121
|
-
#endif
|
|
122
|
-
#endif
|
|
123
|
-
#endif
|
|
124
|
-
#endif
|
|
125
|
-
#ifdef DETAIL
|
|
126
|
-
uniform vec4 vDetailInfos;uniform mat4 detailMatrix;
|
|
127
|
-
#endif
|
|
128
|
-
#include<decalVertexDeclaration>
|
|
129
|
-
#define ADDITIONAL_VERTEX_DECLARATION
|
|
130
|
-
`;
|
|
131
|
-
// Sideeffect
|
|
132
|
-
ShaderStore.IncludesShadersStore[name$s] = shader$s;
|
|
133
|
-
|
|
134
|
-
// Do not edit.
|
|
135
|
-
const name$r = "uvAttributeDeclaration";
|
|
136
|
-
const shader$r = `#ifdef UV{X}
|
|
137
|
-
attribute vec2 uv{X};
|
|
138
|
-
#endif
|
|
139
|
-
`;
|
|
140
|
-
// Sideeffect
|
|
141
|
-
ShaderStore.IncludesShadersStore[name$r] = shader$r;
|
|
142
|
-
|
|
143
|
-
// Do not edit.
|
|
144
|
-
const name$q = "bonesDeclaration";
|
|
145
|
-
const shader$q = `#if NUM_BONE_INFLUENCERS>0
|
|
146
|
-
attribute vec4 matricesIndices;attribute vec4 matricesWeights;
|
|
147
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
148
|
-
attribute vec4 matricesIndicesExtra;attribute vec4 matricesWeightsExtra;
|
|
149
|
-
#endif
|
|
150
|
-
#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
151
|
-
#ifdef BONETEXTURE
|
|
152
|
-
uniform highp sampler2D boneSampler;uniform float boneTextureWidth;
|
|
153
|
-
#else
|
|
154
|
-
uniform mat4 mBones[BonesPerMesh];
|
|
155
|
-
#endif
|
|
156
|
-
#ifdef BONES_VELOCITY_ENABLED
|
|
157
|
-
uniform mat4 mPreviousBones[BonesPerMesh];
|
|
158
|
-
#endif
|
|
159
|
-
#ifdef BONETEXTURE
|
|
160
|
-
#define inline
|
|
161
|
-
mat4 readMatrixFromRawSampler(sampler2D smp,float index)
|
|
162
|
-
{float offset=index *4.0;float dx=1.0/boneTextureWidth;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.));return mat4(m0,m1,m2,m3);}
|
|
163
|
-
#endif
|
|
164
|
-
#endif
|
|
165
|
-
#endif
|
|
166
|
-
`;
|
|
167
|
-
// Sideeffect
|
|
168
|
-
ShaderStore.IncludesShadersStore[name$q] = shader$q;
|
|
169
|
-
|
|
170
|
-
// Do not edit.
|
|
171
|
-
const name$p = "bakedVertexAnimationDeclaration";
|
|
172
|
-
const shader$p = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
173
|
-
uniform float bakedVertexAnimationTime;uniform vec2 bakedVertexAnimationTextureSizeInverted;uniform vec4 bakedVertexAnimationSettings;uniform sampler2D bakedVertexAnimationTexture;
|
|
174
|
-
#ifdef INSTANCES
|
|
175
|
-
attribute vec4 bakedVertexAnimationSettingsInstanced;
|
|
176
|
-
#endif
|
|
177
|
-
#define inline
|
|
178
|
-
mat4 readMatrixFromRawSamplerVAT(sampler2D smp,float index,float frame)
|
|
179
|
-
{float offset=index*4.0;float frameUV=(frame+0.5)*bakedVertexAnimationTextureSizeInverted.y;float dx=bakedVertexAnimationTextureSizeInverted.x;vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),frameUV));vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),frameUV));vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),frameUV));vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),frameUV));return mat4(m0,m1,m2,m3);}
|
|
180
|
-
#endif
|
|
181
|
-
`;
|
|
182
|
-
// Sideeffect
|
|
183
|
-
ShaderStore.IncludesShadersStore[name$p] = shader$p;
|
|
184
|
-
|
|
185
|
-
// Do not edit.
|
|
186
|
-
const name$o = "instancesDeclaration";
|
|
187
|
-
const shader$o = `#ifdef INSTANCES
|
|
188
|
-
attribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;
|
|
189
|
-
#ifdef INSTANCESCOLOR
|
|
190
|
-
attribute vec4 instanceColor;
|
|
191
|
-
#endif
|
|
192
|
-
#if defined(THIN_INSTANCES) && !defined(WORLD_UBO)
|
|
193
|
-
uniform mat4 world;
|
|
194
|
-
#endif
|
|
195
|
-
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || \
|
|
196
|
-
defined(PREPASS_VELOCITY_LINEAR)
|
|
197
|
-
attribute vec4 previousWorld0;attribute vec4 previousWorld1;attribute vec4 previousWorld2;attribute vec4 previousWorld3;
|
|
198
|
-
#ifdef THIN_INSTANCES
|
|
199
|
-
uniform mat4 previousWorld;
|
|
200
|
-
#endif
|
|
201
|
-
#endif
|
|
202
|
-
#else
|
|
203
|
-
#if !defined(WORLD_UBO)
|
|
204
|
-
uniform mat4 world;
|
|
205
|
-
#endif
|
|
206
|
-
#if defined(VELOCITY) || defined(PREPASS_VELOCITY) || \
|
|
207
|
-
defined(PREPASS_VELOCITY_LINEAR)
|
|
208
|
-
uniform mat4 previousWorld;
|
|
209
|
-
#endif
|
|
210
|
-
#endif
|
|
211
|
-
`;
|
|
212
|
-
// Sideeffect
|
|
213
|
-
ShaderStore.IncludesShadersStore[name$o] = shader$o;
|
|
214
|
-
|
|
215
|
-
// Do not edit.
|
|
216
|
-
const name$n = "prePassVertexDeclaration";
|
|
217
|
-
const shader$n = `#ifdef PREPASS
|
|
218
|
-
#ifdef PREPASS_LOCAL_POSITION
|
|
219
|
-
varying vec3 vPosition;
|
|
220
|
-
#endif
|
|
221
|
-
#ifdef PREPASS_DEPTH
|
|
222
|
-
varying vec3 vViewPos;
|
|
223
|
-
#endif
|
|
224
|
-
#if defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)
|
|
225
|
-
uniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;
|
|
226
|
-
#endif
|
|
227
|
-
#endif
|
|
228
|
-
`;
|
|
229
|
-
// Sideeffect
|
|
230
|
-
ShaderStore.IncludesShadersStore[name$n] = shader$n;
|
|
231
|
-
|
|
232
|
-
// Do not edit.
|
|
233
|
-
const name$m = "samplerVertexDeclaration";
|
|
234
|
-
const shader$m = `#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
|
|
235
|
-
varying vec2 v_VARYINGNAME_UV;
|
|
236
|
-
#endif
|
|
237
|
-
`;
|
|
238
|
-
// Sideeffect
|
|
239
|
-
ShaderStore.IncludesShadersStore[name$m] = shader$m;
|
|
240
|
-
|
|
241
|
-
// Do not edit.
|
|
242
|
-
const name$l = "bumpVertexDeclaration";
|
|
243
|
-
const shader$l = `#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
|
|
244
|
-
#if defined(TANGENT) && defined(NORMAL)
|
|
245
|
-
varying mat3 vTBN;
|
|
246
|
-
#endif
|
|
247
|
-
#endif
|
|
248
|
-
`;
|
|
249
|
-
// Sideeffect
|
|
250
|
-
ShaderStore.IncludesShadersStore[name$l] = shader$l;
|
|
251
|
-
|
|
252
|
-
// Do not edit.
|
|
253
|
-
const name$k = "clipPlaneVertexDeclaration";
|
|
254
|
-
const shader$k = `#ifdef CLIPPLANE
|
|
255
|
-
uniform vec4 vClipPlane;varying float fClipDistance;
|
|
256
|
-
#endif
|
|
257
|
-
#ifdef CLIPPLANE2
|
|
258
|
-
uniform vec4 vClipPlane2;varying float fClipDistance2;
|
|
259
|
-
#endif
|
|
260
|
-
#ifdef CLIPPLANE3
|
|
261
|
-
uniform vec4 vClipPlane3;varying float fClipDistance3;
|
|
262
|
-
#endif
|
|
263
|
-
#ifdef CLIPPLANE4
|
|
264
|
-
uniform vec4 vClipPlane4;varying float fClipDistance4;
|
|
265
|
-
#endif
|
|
266
|
-
#ifdef CLIPPLANE5
|
|
267
|
-
uniform vec4 vClipPlane5;varying float fClipDistance5;
|
|
268
|
-
#endif
|
|
269
|
-
#ifdef CLIPPLANE6
|
|
270
|
-
uniform vec4 vClipPlane6;varying float fClipDistance6;
|
|
271
|
-
#endif
|
|
272
|
-
`;
|
|
273
|
-
// Sideeffect
|
|
274
|
-
ShaderStore.IncludesShadersStore[name$k] = shader$k;
|
|
275
|
-
|
|
276
|
-
// Do not edit.
|
|
277
|
-
const name$j = "fogVertexDeclaration";
|
|
278
|
-
const shader$j = `#ifdef FOG
|
|
279
|
-
varying vec3 vFogDistance;
|
|
280
|
-
#endif
|
|
281
|
-
`;
|
|
282
|
-
// Sideeffect
|
|
283
|
-
ShaderStore.IncludesShadersStore[name$j] = shader$j;
|
|
284
|
-
|
|
285
|
-
// Do not edit.
|
|
286
|
-
const name$i = "lightVxFragmentDeclaration";
|
|
287
|
-
const shader$i = `#ifdef LIGHT{X}
|
|
288
|
-
uniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};
|
|
289
|
-
#ifdef SPECULARTERM
|
|
290
|
-
uniform vec4 vLightSpecular{X};
|
|
291
|
-
#else
|
|
292
|
-
vec4 vLightSpecular{X}=vec4(0.);
|
|
293
|
-
#endif
|
|
294
|
-
#ifdef SHADOW{X}
|
|
295
|
-
#ifdef SHADOWCSM{X}
|
|
296
|
-
uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};
|
|
297
|
-
#elif defined(SHADOWCUBE{X})
|
|
298
|
-
#else
|
|
299
|
-
varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};
|
|
300
|
-
#endif
|
|
301
|
-
uniform vec4 shadowsInfo{X};uniform vec2 depthValues{X};
|
|
302
|
-
#endif
|
|
303
|
-
#ifdef SPOTLIGHT{X}
|
|
304
|
-
uniform vec4 vLightDirection{X};uniform vec4 vLightFalloff{X};
|
|
305
|
-
#elif defined(POINTLIGHT{X})
|
|
306
|
-
uniform vec4 vLightFalloff{X};
|
|
307
|
-
#elif defined(HEMILIGHT{X})
|
|
308
|
-
uniform vec3 vLightGround{X};
|
|
309
|
-
#endif
|
|
310
|
-
#endif
|
|
311
|
-
`;
|
|
312
|
-
// Sideeffect
|
|
313
|
-
ShaderStore.IncludesShadersStore[name$i] = shader$i;
|
|
314
|
-
|
|
315
|
-
// Do not edit.
|
|
316
|
-
const name$h = "lightVxUboDeclaration";
|
|
317
|
-
const shader$h = `#ifdef LIGHT{X}
|
|
318
|
-
uniform Light{X}
|
|
319
|
-
{vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;
|
|
320
|
-
#ifdef SPOTLIGHT{X}
|
|
321
|
-
vec4 vLightDirection;vec4 vLightFalloff;
|
|
322
|
-
#elif defined(POINTLIGHT{X})
|
|
323
|
-
vec4 vLightFalloff;
|
|
324
|
-
#elif defined(HEMILIGHT{X})
|
|
325
|
-
vec3 vLightGround;
|
|
326
|
-
#endif
|
|
327
|
-
vec4 shadowsInfo;vec2 depthValues;} light{X};
|
|
328
|
-
#ifdef SHADOW{X}
|
|
329
|
-
#ifdef SHADOWCSM{X}
|
|
330
|
-
uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}];varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}];varying vec4 vPositionFromCamera{X};
|
|
331
|
-
#elif defined(SHADOWCUBE{X})
|
|
332
|
-
#else
|
|
333
|
-
varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 lightMatrix{X};
|
|
334
|
-
#endif
|
|
335
|
-
#endif
|
|
336
|
-
#endif
|
|
337
|
-
`;
|
|
338
|
-
// Sideeffect
|
|
339
|
-
ShaderStore.IncludesShadersStore[name$h] = shader$h;
|
|
340
|
-
|
|
341
|
-
// Do not edit.
|
|
342
|
-
const name$g = "morphTargetsVertexGlobalDeclaration";
|
|
343
|
-
const shader$g = `#ifdef MORPHTARGETS
|
|
344
|
-
uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];
|
|
345
|
-
#ifdef MORPHTARGETS_TEXTURE
|
|
346
|
-
uniform float morphTargetTextureIndices[NUM_MORPH_INFLUENCERS];uniform vec3 morphTargetTextureInfo;uniform highp sampler2DArray morphTargets;vec3 readVector3FromRawSampler(int targetIndex,float vertexIndex)
|
|
347
|
-
{
|
|
348
|
-
float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphTargetTextureInfo.y;vec3 textureUV=vec3((x+0.5)/morphTargetTextureInfo.y,(y+0.5)/morphTargetTextureInfo.z,morphTargetTextureIndices[targetIndex]);return texture(morphTargets,textureUV).xyz;}
|
|
349
|
-
#endif
|
|
350
|
-
#endif
|
|
351
|
-
`;
|
|
352
|
-
// Sideeffect
|
|
353
|
-
ShaderStore.IncludesShadersStore[name$g] = shader$g;
|
|
354
|
-
|
|
355
|
-
// Do not edit.
|
|
356
|
-
const name$f = "morphTargetsVertexDeclaration";
|
|
357
|
-
const shader$f = `#ifdef MORPHTARGETS
|
|
358
|
-
#ifndef MORPHTARGETS_TEXTURE
|
|
359
|
-
attribute vec3 position{X};
|
|
360
|
-
#ifdef MORPHTARGETS_NORMAL
|
|
361
|
-
attribute vec3 normal{X};
|
|
362
|
-
#endif
|
|
363
|
-
#ifdef MORPHTARGETS_TANGENT
|
|
364
|
-
attribute vec3 tangent{X};
|
|
365
|
-
#endif
|
|
366
|
-
#ifdef MORPHTARGETS_UV
|
|
367
|
-
attribute vec2 uv_{X};
|
|
368
|
-
#endif
|
|
369
|
-
#elif {X}==0
|
|
370
|
-
uniform int morphTargetCount;
|
|
371
|
-
#endif
|
|
372
|
-
#endif
|
|
373
|
-
`;
|
|
374
|
-
// Sideeffect
|
|
375
|
-
ShaderStore.IncludesShadersStore[name$f] = shader$f;
|
|
376
|
-
|
|
377
|
-
// Do not edit.
|
|
378
|
-
const name$e = "morphTargetsVertexGlobal";
|
|
379
|
-
const shader$e = `#ifdef MORPHTARGETS
|
|
380
|
-
#ifdef MORPHTARGETS_TEXTURE
|
|
381
|
-
float vertexID;
|
|
382
|
-
#endif
|
|
383
|
-
#endif
|
|
384
|
-
`;
|
|
385
|
-
// Sideeffect
|
|
386
|
-
ShaderStore.IncludesShadersStore[name$e] = shader$e;
|
|
387
|
-
|
|
388
|
-
// Do not edit.
|
|
389
|
-
const name$d = "morphTargetsVertex";
|
|
390
|
-
const shader$d = `#ifdef MORPHTARGETS
|
|
391
|
-
#ifdef MORPHTARGETS_TEXTURE
|
|
392
|
-
#if {X}==0
|
|
393
|
-
for (int i=0; i<NUM_MORPH_INFLUENCERS; i++) {if (i>=morphTargetCount) break;vertexID=float(gl_VertexID)*morphTargetTextureInfo.x;positionUpdated+=(readVector3FromRawSampler(i,vertexID)-position)*morphTargetInfluences[i];vertexID+=1.0;
|
|
394
|
-
#ifdef MORPHTARGETS_NORMAL
|
|
395
|
-
normalUpdated+=(readVector3FromRawSampler(i,vertexID) -normal)*morphTargetInfluences[i];vertexID+=1.0;
|
|
396
|
-
#endif
|
|
397
|
-
#ifdef MORPHTARGETS_UV
|
|
398
|
-
uvUpdated+=(readVector3FromRawSampler(i,vertexID).xy-uv)*morphTargetInfluences[i];vertexID+=1.0;
|
|
399
|
-
#endif
|
|
400
|
-
#ifdef MORPHTARGETS_TANGENT
|
|
401
|
-
tangentUpdated.xyz+=(readVector3FromRawSampler(i,vertexID) -tangent.xyz)*morphTargetInfluences[i];
|
|
402
|
-
#endif
|
|
403
|
-
}
|
|
404
|
-
#endif
|
|
405
|
-
#else
|
|
406
|
-
positionUpdated+=(position{X}-position)*morphTargetInfluences[{X}];
|
|
407
|
-
#ifdef MORPHTARGETS_NORMAL
|
|
408
|
-
normalUpdated+=(normal{X}-normal)*morphTargetInfluences[{X}];
|
|
409
|
-
#endif
|
|
410
|
-
#ifdef MORPHTARGETS_TANGENT
|
|
411
|
-
tangentUpdated.xyz+=(tangent{X}-tangent.xyz)*morphTargetInfluences[{X}];
|
|
412
|
-
#endif
|
|
413
|
-
#ifdef MORPHTARGETS_UV
|
|
414
|
-
uvUpdated+=(uv_{X}-uv)*morphTargetInfluences[{X}];
|
|
415
|
-
#endif
|
|
416
|
-
#endif
|
|
417
|
-
#endif
|
|
418
|
-
`;
|
|
419
|
-
// Sideeffect
|
|
420
|
-
ShaderStore.IncludesShadersStore[name$d] = shader$d;
|
|
421
|
-
|
|
422
|
-
// Do not edit.
|
|
423
|
-
const name$c = "instancesVertex";
|
|
424
|
-
const shader$c = `#ifdef INSTANCES
|
|
425
|
-
mat4 finalWorld=mat4(world0,world1,world2,world3);
|
|
426
|
-
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || \
|
|
427
|
-
defined(PREPASS_VELOCITY_LINEAR)
|
|
428
|
-
mat4 finalPreviousWorld=mat4(previousWorld0,previousWorld1,
|
|
429
|
-
previousWorld2,previousWorld3);
|
|
430
|
-
#endif
|
|
431
|
-
#ifdef THIN_INSTANCES
|
|
432
|
-
finalWorld=world*finalWorld;
|
|
433
|
-
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || \
|
|
434
|
-
defined(PREPASS_VELOCITY_LINEAR)
|
|
435
|
-
finalPreviousWorld=previousWorld*finalPreviousWorld;
|
|
436
|
-
#endif
|
|
437
|
-
#endif
|
|
438
|
-
#else
|
|
439
|
-
mat4 finalWorld=world;
|
|
440
|
-
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || \
|
|
441
|
-
defined(PREPASS_VELOCITY_LINEAR)
|
|
442
|
-
mat4 finalPreviousWorld=previousWorld;
|
|
443
|
-
#endif
|
|
444
|
-
#endif
|
|
445
|
-
`;
|
|
446
|
-
// Sideeffect
|
|
447
|
-
ShaderStore.IncludesShadersStore[name$c] = shader$c;
|
|
448
|
-
|
|
449
|
-
// Do not edit.
|
|
450
|
-
const name$b = "bonesVertex";
|
|
451
|
-
const shader$b = `#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
452
|
-
#if NUM_BONE_INFLUENCERS>0
|
|
453
|
-
mat4 influence;
|
|
454
|
-
#ifdef BONETEXTURE
|
|
455
|
-
influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];
|
|
456
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
457
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];
|
|
458
|
-
#endif
|
|
459
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
460
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];
|
|
461
|
-
#endif
|
|
462
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
463
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];
|
|
464
|
-
#endif
|
|
465
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
466
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];
|
|
467
|
-
#endif
|
|
468
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
469
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];
|
|
470
|
-
#endif
|
|
471
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
472
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];
|
|
473
|
-
#endif
|
|
474
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
475
|
-
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];
|
|
476
|
-
#endif
|
|
477
|
-
#else
|
|
478
|
-
influence=mBones[int(matricesIndices[0])]*matricesWeights[0];
|
|
479
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
480
|
-
influence+=mBones[int(matricesIndices[1])]*matricesWeights[1];
|
|
481
|
-
#endif
|
|
482
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
483
|
-
influence+=mBones[int(matricesIndices[2])]*matricesWeights[2];
|
|
484
|
-
#endif
|
|
485
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
486
|
-
influence+=mBones[int(matricesIndices[3])]*matricesWeights[3];
|
|
487
|
-
#endif
|
|
488
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
489
|
-
influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
|
|
490
|
-
#endif
|
|
491
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
492
|
-
influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
|
|
493
|
-
#endif
|
|
494
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
495
|
-
influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
|
|
496
|
-
#endif
|
|
497
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
498
|
-
influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
|
|
499
|
-
#endif
|
|
500
|
-
#endif
|
|
501
|
-
finalWorld=finalWorld*influence;
|
|
502
|
-
#endif
|
|
503
|
-
#endif
|
|
504
|
-
`;
|
|
505
|
-
// Sideeffect
|
|
506
|
-
ShaderStore.IncludesShadersStore[name$b] = shader$b;
|
|
507
|
-
|
|
508
|
-
// Do not edit.
|
|
509
|
-
const name$a = "bakedVertexAnimation";
|
|
510
|
-
const shader$a = `#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
511
|
-
{
|
|
512
|
-
#ifdef INSTANCES
|
|
513
|
-
#define BVASNAME bakedVertexAnimationSettingsInstanced
|
|
514
|
-
#else
|
|
515
|
-
#define BVASNAME bakedVertexAnimationSettings
|
|
516
|
-
#endif
|
|
517
|
-
float VATStartFrame=BVASNAME.x;float VATEndFrame=BVASNAME.y;float VATOffsetFrame=BVASNAME.z;float VATSpeed=BVASNAME.w;float totalFrames=VATEndFrame-VATStartFrame+1.0;float time=bakedVertexAnimationTime*VATSpeed/totalFrames;float frameCorrection=time<1.0 ? 0.0 : 1.0;float numOfFrames=totalFrames-frameCorrection;float VATFrameNum=fract(time)*numOfFrames;VATFrameNum=mod(VATFrameNum+VATOffsetFrame,numOfFrames);VATFrameNum=floor(VATFrameNum);VATFrameNum+=VATStartFrame+frameCorrection;mat4 VATInfluence;VATInfluence=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[0],VATFrameNum)*matricesWeights[0];
|
|
518
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
519
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[1],VATFrameNum)*matricesWeights[1];
|
|
520
|
-
#endif
|
|
521
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
522
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[2],VATFrameNum)*matricesWeights[2];
|
|
523
|
-
#endif
|
|
524
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
525
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndices[3],VATFrameNum)*matricesWeights[3];
|
|
526
|
-
#endif
|
|
527
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
528
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[0],VATFrameNum)*matricesWeightsExtra[0];
|
|
529
|
-
#endif
|
|
530
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
531
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[1],VATFrameNum)*matricesWeightsExtra[1];
|
|
532
|
-
#endif
|
|
533
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
534
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[2],VATFrameNum)*matricesWeightsExtra[2];
|
|
535
|
-
#endif
|
|
536
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
537
|
-
VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIndicesExtra[3],VATFrameNum)*matricesWeightsExtra[3];
|
|
538
|
-
#endif
|
|
539
|
-
finalWorld=finalWorld*VATInfluence;}
|
|
540
|
-
#endif
|
|
541
|
-
`;
|
|
542
|
-
// Sideeffect
|
|
543
|
-
ShaderStore.IncludesShadersStore[name$a] = shader$a;
|
|
544
|
-
|
|
545
|
-
// Do not edit.
|
|
546
|
-
const name$9 = "prePassVertex";
|
|
547
|
-
const shader$9 = `#ifdef PREPASS_DEPTH
|
|
548
|
-
vViewPos=(view*worldPos).rgb;
|
|
549
|
-
#endif
|
|
550
|
-
#ifdef PREPASS_LOCAL_POSITION
|
|
551
|
-
vPosition=positionUpdated.xyz;
|
|
552
|
-
#endif
|
|
553
|
-
#if defined(PREPASS_VELOCITY) && defined(BONES_VELOCITY_ENABLED) || \
|
|
554
|
-
defined(PREPASS_VELOCITY_LINEAR)
|
|
555
|
-
vCurrentPosition=viewProjection*worldPos;
|
|
556
|
-
#if NUM_BONE_INFLUENCERS>0
|
|
557
|
-
mat4 previousInfluence;previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0];
|
|
558
|
-
#if NUM_BONE_INFLUENCERS>1
|
|
559
|
-
previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1];
|
|
560
|
-
#endif
|
|
561
|
-
#if NUM_BONE_INFLUENCERS>2
|
|
562
|
-
previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2];
|
|
563
|
-
#endif
|
|
564
|
-
#if NUM_BONE_INFLUENCERS>3
|
|
565
|
-
previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3];
|
|
566
|
-
#endif
|
|
567
|
-
#if NUM_BONE_INFLUENCERS>4
|
|
568
|
-
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
|
|
569
|
-
#endif
|
|
570
|
-
#if NUM_BONE_INFLUENCERS>5
|
|
571
|
-
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
|
|
572
|
-
#endif
|
|
573
|
-
#if NUM_BONE_INFLUENCERS>6
|
|
574
|
-
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
|
|
575
|
-
#endif
|
|
576
|
-
#if NUM_BONE_INFLUENCERS>7
|
|
577
|
-
previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
|
|
578
|
-
#endif
|
|
579
|
-
vPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*vec4(positionUpdated,1.0);
|
|
580
|
-
#else
|
|
581
|
-
vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);
|
|
582
|
-
#endif
|
|
583
|
-
#endif
|
|
584
|
-
`;
|
|
585
|
-
// Sideeffect
|
|
586
|
-
ShaderStore.IncludesShadersStore[name$9] = shader$9;
|
|
587
|
-
|
|
588
|
-
// Do not edit.
|
|
589
|
-
const name$8 = "uvVariableDeclaration";
|
|
590
|
-
const shader$8 = `#if !defined(UV{X}) && defined(MAINUV{X})
|
|
591
|
-
vec2 uv{X}=vec2(0.,0.);
|
|
592
|
-
#endif
|
|
593
|
-
#ifdef MAINUV{X}
|
|
594
|
-
vMainUV{X}=uv{X};
|
|
595
|
-
#endif
|
|
596
|
-
`;
|
|
597
|
-
// Sideeffect
|
|
598
|
-
ShaderStore.IncludesShadersStore[name$8] = shader$8;
|
|
599
|
-
|
|
600
|
-
// Do not edit.
|
|
601
|
-
const name$7 = "samplerVertexImplementation";
|
|
602
|
-
const shader$7 = `#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
|
|
603
|
-
if (v_INFONAME_==0.)
|
|
604
|
-
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uvUpdated,1.0,0.0));}
|
|
605
|
-
#ifdef UV2
|
|
606
|
-
else if (v_INFONAME_==1.)
|
|
607
|
-
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv2,1.0,0.0));}
|
|
608
|
-
#endif
|
|
609
|
-
#ifdef UV3
|
|
610
|
-
else if (v_INFONAME_==2.)
|
|
611
|
-
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv3,1.0,0.0));}
|
|
612
|
-
#endif
|
|
613
|
-
#ifdef UV4
|
|
614
|
-
else if (v_INFONAME_==3.)
|
|
615
|
-
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv4,1.0,0.0));}
|
|
616
|
-
#endif
|
|
617
|
-
#ifdef UV5
|
|
618
|
-
else if (v_INFONAME_==4.)
|
|
619
|
-
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv5,1.0,0.0));}
|
|
620
|
-
#endif
|
|
621
|
-
#ifdef UV6
|
|
622
|
-
else if (v_INFONAME_==5.)
|
|
623
|
-
{v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv6,1.0,0.0));}
|
|
624
|
-
#endif
|
|
625
|
-
#endif
|
|
626
|
-
`;
|
|
627
|
-
// Sideeffect
|
|
628
|
-
ShaderStore.IncludesShadersStore[name$7] = shader$7;
|
|
629
|
-
|
|
630
|
-
// Do not edit.
|
|
631
|
-
const name$6 = "bumpVertex";
|
|
632
|
-
const shader$6 = `#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
|
|
633
|
-
#if defined(TANGENT) && defined(NORMAL)
|
|
634
|
-
vec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);
|
|
635
|
-
#endif
|
|
636
|
-
#endif
|
|
637
|
-
`;
|
|
638
|
-
// Sideeffect
|
|
639
|
-
ShaderStore.IncludesShadersStore[name$6] = shader$6;
|
|
640
|
-
|
|
641
|
-
// Do not edit.
|
|
642
|
-
const name$5 = "clipPlaneVertex";
|
|
643
|
-
const shader$5 = `#ifdef CLIPPLANE
|
|
644
|
-
fClipDistance=dot(worldPos,vClipPlane);
|
|
645
|
-
#endif
|
|
646
|
-
#ifdef CLIPPLANE2
|
|
647
|
-
fClipDistance2=dot(worldPos,vClipPlane2);
|
|
648
|
-
#endif
|
|
649
|
-
#ifdef CLIPPLANE3
|
|
650
|
-
fClipDistance3=dot(worldPos,vClipPlane3);
|
|
651
|
-
#endif
|
|
652
|
-
#ifdef CLIPPLANE4
|
|
653
|
-
fClipDistance4=dot(worldPos,vClipPlane4);
|
|
654
|
-
#endif
|
|
655
|
-
#ifdef CLIPPLANE5
|
|
656
|
-
fClipDistance5=dot(worldPos,vClipPlane5);
|
|
657
|
-
#endif
|
|
658
|
-
#ifdef CLIPPLANE6
|
|
659
|
-
fClipDistance6=dot(worldPos,vClipPlane6);
|
|
660
|
-
#endif
|
|
661
|
-
`;
|
|
662
|
-
// Sideeffect
|
|
663
|
-
ShaderStore.IncludesShadersStore[name$5] = shader$5;
|
|
664
|
-
|
|
665
|
-
// Do not edit.
|
|
666
|
-
const name$4 = "fogVertex";
|
|
667
|
-
const shader$4 = `#ifdef FOG
|
|
668
|
-
vFogDistance=(view*worldPos).xyz;
|
|
669
|
-
#endif
|
|
670
|
-
`;
|
|
671
|
-
// Sideeffect
|
|
672
|
-
ShaderStore.IncludesShadersStore[name$4] = shader$4;
|
|
673
|
-
|
|
674
|
-
// Do not edit.
|
|
675
|
-
const name$3 = "shadowsVertex";
|
|
676
|
-
const shader$3 = `#ifdef SHADOWS
|
|
677
|
-
#if defined(SHADOWCSM{X})
|
|
678
|
-
vPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;
|
|
679
|
-
#ifdef USE_REVERSE_DEPTHBUFFER
|
|
680
|
-
vDepthMetric{X}[i]=(-vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
681
|
-
#else
|
|
682
|
-
vDepthMetric{X}[i]=(vPositionFromLight{X}[i].z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
683
|
-
#endif
|
|
684
|
-
}
|
|
685
|
-
#elif defined(SHADOW{X}) && !defined(SHADOWCUBE{X})
|
|
686
|
-
vPositionFromLight{X}=lightMatrix{X}*worldPos;
|
|
687
|
-
#ifdef USE_REVERSE_DEPTHBUFFER
|
|
688
|
-
vDepthMetric{X}=(-vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
689
|
-
#else
|
|
690
|
-
vDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthValues.y;
|
|
691
|
-
#endif
|
|
692
|
-
#endif
|
|
693
|
-
#endif
|
|
694
|
-
`;
|
|
695
|
-
// Sideeffect
|
|
696
|
-
ShaderStore.IncludesShadersStore[name$3] = shader$3;
|
|
697
|
-
|
|
698
|
-
// Do not edit.
|
|
699
|
-
const name$2 = "vertexColorMixing";
|
|
700
|
-
const shader$2 = `#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
|
|
701
|
-
vColor=vec4(1.0);
|
|
702
|
-
#ifdef VERTEXCOLOR
|
|
703
|
-
#ifdef VERTEXALPHA
|
|
704
|
-
vColor*=color;
|
|
705
|
-
#else
|
|
706
|
-
vColor.rgb*=color.rgb;
|
|
707
|
-
#endif
|
|
708
|
-
#endif
|
|
709
|
-
#ifdef INSTANCESCOLOR
|
|
710
|
-
vColor*=instanceColor;
|
|
711
|
-
#endif
|
|
712
|
-
#endif
|
|
713
|
-
`;
|
|
714
|
-
// Sideeffect
|
|
715
|
-
ShaderStore.IncludesShadersStore[name$2] = shader$2;
|
|
716
|
-
|
|
717
|
-
// Do not edit.
|
|
718
|
-
const name$1 = "logDepthVertex";
|
|
719
|
-
const shader$1 = `#ifdef LOGARITHMICDEPTH
|
|
720
|
-
vFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;
|
|
721
|
-
#endif
|
|
722
|
-
`;
|
|
723
|
-
// Sideeffect
|
|
724
|
-
ShaderStore.IncludesShadersStore[name$1] = shader$1;
|
|
725
|
-
|
|
726
|
-
// Do not edit.
|
|
727
|
-
const name = "pbrVertexShader";
|
|
728
|
-
const shader = `precision highp float;
|
|
729
|
-
#include<__decl__pbrVertex>
|
|
730
|
-
#define CUSTOM_VERTEX_BEGIN
|
|
731
|
-
attribute vec3 position;
|
|
732
|
-
#ifdef NORMAL
|
|
733
|
-
attribute vec3 normal;
|
|
734
|
-
#endif
|
|
735
|
-
#ifdef TANGENT
|
|
736
|
-
attribute vec4 tangent;
|
|
737
|
-
#endif
|
|
738
|
-
#ifdef UV1
|
|
739
|
-
attribute vec2 uv;
|
|
740
|
-
#endif
|
|
741
|
-
#include<uvAttributeDeclaration>[2..7]
|
|
742
|
-
#include<mainUVVaryingDeclaration>[1..7]
|
|
743
|
-
#ifdef VERTEXCOLOR
|
|
744
|
-
attribute vec4 color;
|
|
745
|
-
#endif
|
|
746
|
-
#include<helperFunctions>
|
|
747
|
-
#include<bonesDeclaration>
|
|
748
|
-
#include<bakedVertexAnimationDeclaration>
|
|
749
|
-
#include<instancesDeclaration>
|
|
750
|
-
#include<prePassVertexDeclaration>
|
|
751
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo)
|
|
752
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)
|
|
753
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)
|
|
754
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)
|
|
755
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)
|
|
756
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)
|
|
757
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)
|
|
758
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)
|
|
759
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)
|
|
760
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)
|
|
761
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)
|
|
762
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)
|
|
763
|
-
#ifdef CLEARCOAT
|
|
764
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)
|
|
765
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)
|
|
766
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)
|
|
767
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)
|
|
768
|
-
#endif
|
|
769
|
-
#ifdef IRIDESCENCE
|
|
770
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)
|
|
771
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)
|
|
772
|
-
#endif
|
|
773
|
-
#ifdef SHEEN
|
|
774
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)
|
|
775
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)
|
|
776
|
-
#endif
|
|
777
|
-
#ifdef ANISOTROPIC
|
|
778
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)
|
|
779
|
-
#endif
|
|
780
|
-
#ifdef SUBSURFACE
|
|
781
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)
|
|
782
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)
|
|
783
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)
|
|
784
|
-
#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)
|
|
785
|
-
#endif
|
|
786
|
-
varying vec3 vPositionW;
|
|
787
|
-
#if DEBUGMODE>0
|
|
788
|
-
varying vec4 vClipSpacePosition;
|
|
789
|
-
#endif
|
|
790
|
-
#ifdef NORMAL
|
|
791
|
-
varying vec3 vNormalW;
|
|
792
|
-
#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
|
|
793
|
-
varying vec3 vEnvironmentIrradiance;
|
|
794
|
-
#include<harmonicsFunctions>
|
|
795
|
-
#endif
|
|
796
|
-
#endif
|
|
797
|
-
#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
|
|
798
|
-
varying vec4 vColor;
|
|
799
|
-
#endif
|
|
800
|
-
#include<bumpVertexDeclaration>
|
|
801
|
-
#include<clipPlaneVertexDeclaration>
|
|
802
|
-
#include<fogVertexDeclaration>
|
|
803
|
-
#include<__decl__lightVxFragment>[0..maxSimultaneousLights]
|
|
804
|
-
#include<morphTargetsVertexGlobalDeclaration>
|
|
805
|
-
#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]
|
|
806
|
-
#ifdef REFLECTIONMAP_SKYBOX
|
|
807
|
-
varying vec3 vPositionUVW;
|
|
808
|
-
#endif
|
|
809
|
-
#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
|
|
810
|
-
varying vec3 vDirectionW;
|
|
811
|
-
#endif
|
|
812
|
-
#include<logDepthDeclaration>
|
|
813
|
-
#define CUSTOM_VERTEX_DEFINITIONS
|
|
814
|
-
void main(void) {
|
|
815
|
-
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
816
|
-
vec3 positionUpdated=position;
|
|
817
|
-
#ifdef NORMAL
|
|
818
|
-
vec3 normalUpdated=normal;
|
|
819
|
-
#endif
|
|
820
|
-
#ifdef TANGENT
|
|
821
|
-
vec4 tangentUpdated=tangent;
|
|
822
|
-
#endif
|
|
823
|
-
#ifdef UV1
|
|
824
|
-
vec2 uvUpdated=uv;
|
|
825
|
-
#endif
|
|
826
|
-
#include<morphTargetsVertexGlobal>
|
|
827
|
-
#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]
|
|
828
|
-
#ifdef REFLECTIONMAP_SKYBOX
|
|
829
|
-
vPositionUVW=positionUpdated;
|
|
830
|
-
#endif
|
|
831
|
-
#define CUSTOM_VERTEX_UPDATE_POSITION
|
|
832
|
-
#define CUSTOM_VERTEX_UPDATE_NORMAL
|
|
833
|
-
#include<instancesVertex>
|
|
834
|
-
#if defined(PREPASS) && \
|
|
835
|
-
(defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED) || \
|
|
836
|
-
defined(PREPASS_VELOCITY_LINEAR))
|
|
837
|
-
vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);
|
|
838
|
-
#endif
|
|
839
|
-
#include<bonesVertex>
|
|
840
|
-
#include<bakedVertexAnimation>
|
|
841
|
-
vec4 worldPos=finalWorld*vec4(positionUpdated,1.0);vPositionW=vec3(worldPos);
|
|
842
|
-
#include<prePassVertex>
|
|
843
|
-
#ifdef NORMAL
|
|
844
|
-
mat3 normalWorld=mat3(finalWorld);
|
|
845
|
-
#if defined(INSTANCES) && defined(THIN_INSTANCES)
|
|
846
|
-
vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);
|
|
847
|
-
#else
|
|
848
|
-
#ifdef NONUNIFORMSCALING
|
|
849
|
-
normalWorld=transposeMat3(inverseMat3(normalWorld));
|
|
850
|
-
#endif
|
|
851
|
-
vNormalW=normalize(normalWorld*normalUpdated);
|
|
852
|
-
#endif
|
|
853
|
-
#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)
|
|
854
|
-
vec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;
|
|
855
|
-
#ifdef REFLECTIONMAP_OPPOSITEZ
|
|
856
|
-
reflectionVector.z*=-1.0;
|
|
857
|
-
#endif
|
|
858
|
-
vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);
|
|
859
|
-
#endif
|
|
860
|
-
#endif
|
|
861
|
-
#define CUSTOM_VERTEX_UPDATE_WORLDPOS
|
|
862
|
-
#ifdef MULTIVIEW
|
|
863
|
-
if (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}
|
|
864
|
-
#else
|
|
865
|
-
gl_Position=viewProjection*worldPos;
|
|
866
|
-
#endif
|
|
867
|
-
#if DEBUGMODE>0
|
|
868
|
-
vClipSpacePosition=gl_Position;
|
|
869
|
-
#endif
|
|
870
|
-
#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)
|
|
871
|
-
vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));
|
|
872
|
-
#endif
|
|
873
|
-
#ifndef UV1
|
|
874
|
-
vec2 uvUpdated=vec2(0.,0.);
|
|
875
|
-
#endif
|
|
876
|
-
#ifdef MAINUV1
|
|
877
|
-
vMainUV1=uvUpdated;
|
|
878
|
-
#endif
|
|
879
|
-
#include<uvVariableDeclaration>[2..7]
|
|
880
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)
|
|
881
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)
|
|
882
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)
|
|
883
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)
|
|
884
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)
|
|
885
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)
|
|
886
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)
|
|
887
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)
|
|
888
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)
|
|
889
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)
|
|
890
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)
|
|
891
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)
|
|
892
|
-
#ifdef CLEARCOAT
|
|
893
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)
|
|
894
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)
|
|
895
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)
|
|
896
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)
|
|
897
|
-
#endif
|
|
898
|
-
#ifdef IRIDESCENCE
|
|
899
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)
|
|
900
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)
|
|
901
|
-
#endif
|
|
902
|
-
#ifdef SHEEN
|
|
903
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)
|
|
904
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheenRoughness,_INFONAME_,SheenInfos.z)
|
|
905
|
-
#endif
|
|
906
|
-
#ifdef ANISOTROPIC
|
|
907
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)
|
|
908
|
-
#endif
|
|
909
|
-
#ifdef SUBSURFACE
|
|
910
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)
|
|
911
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)
|
|
912
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)
|
|
913
|
-
#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor,_MATRIXNAME_,translucencyColor,_INFONAME_,TranslucencyColorInfos.x)
|
|
914
|
-
#endif
|
|
915
|
-
#include<bumpVertex>
|
|
916
|
-
#include<clipPlaneVertex>
|
|
917
|
-
#include<fogVertex>
|
|
918
|
-
#include<shadowsVertex>[0..maxSimultaneousLights]
|
|
919
|
-
#include<vertexColorMixing>
|
|
920
|
-
#if defined(POINTSIZE) && !defined(WEBGPU)
|
|
921
|
-
gl_PointSize=pointSize;
|
|
922
|
-
#endif
|
|
923
|
-
#include<logDepthVertex>
|
|
924
|
-
#define CUSTOM_VERTEX_MAIN_END
|
|
925
|
-
}`;
|
|
926
|
-
// Sideeffect
|
|
927
|
-
ShaderStore.ShadersStore[name] = shader;
|
|
928
|
-
/** @internal */
|
|
929
|
-
const pbrVertexShader = { name, shader };
|
|
930
|
-
|
|
931
|
-
export { pbrVertexShader };
|
|
932
|
-
//# sourceMappingURL=pbr.vertex-62J9fbA6.esm.js.map
|