babylonjs-editor-tools 5.5.0 → 5.5.1-alpha.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/build/index.node.js +2330 -1
- package/build/src/index.js +4 -0
- package/build/src/index.js.map +1 -1
- package/build/src/loading/loader.js +7 -2
- package/build/src/loading/loader.js.map +1 -1
- package/build/src/loading/mesh.js +22 -0
- package/build/src/loading/mesh.js.map +1 -0
- package/build/src/loading/rendering.js +4 -0
- package/build/src/loading/rendering.js.map +1 -1
- package/build/src/loading/transform-node.js +4 -1
- package/build/src/loading/transform-node.js.map +1 -1
- package/build/src/rendering/tools.js +7 -0
- package/build/src/rendering/tools.js.map +1 -1
- package/build/src/rendering/volumetric/pipeline.js +915 -0
- package/build/src/rendering/volumetric/pipeline.js.map +1 -0
- package/build/src/rendering/volumetric/selector.js +525 -0
- package/build/src/rendering/volumetric/selector.js.map +1 -0
- package/build/src/rendering/volumetric/shaders-wgsl.js +1207 -0
- package/build/src/rendering/volumetric/shaders-wgsl.js.map +1 -0
- package/build/src/rendering/volumetric/shaders.js +1293 -0
- package/build/src/rendering/volumetric/shaders.js.map +1 -0
- package/build/src/rendering/volumetric/types.js +301 -0
- package/build/src/rendering/volumetric/types.js.map +1 -0
- package/build/src/rendering/volumetric-lighting.js +72 -0
- package/build/src/rendering/volumetric-lighting.js.map +1 -0
- package/build/src/tools/guards.js +14 -0
- package/build/src/tools/guards.js.map +1 -1
- package/declaration/src/index.d.ts +4 -0
- package/declaration/src/loading/mesh.d.ts +1 -0
- package/declaration/src/rendering/tools.d.ts +1 -0
- package/declaration/src/rendering/volumetric/pipeline.d.ts +231 -0
- package/declaration/src/rendering/volumetric/selector.d.ts +263 -0
- package/declaration/src/rendering/volumetric/shaders-wgsl.d.ts +21 -0
- package/declaration/src/rendering/volumetric/shaders.d.ts +60 -0
- package/declaration/src/rendering/volumetric/types.d.ts +362 -0
- package/declaration/src/rendering/volumetric-lighting.d.ts +28 -0
- package/declaration/src/tools/guards.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shaders.js","sourceRoot":"","sources":["../../../../src/rendering/volumetric/shaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,+BAA+B,CAAC;AAEvF;;GAEG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,8BAA8B,CAAC;AAErF;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,wBAAwB,CAAC;AAEzE;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,2BAA2B,CAAC;AAE/E;;GAEG;AACH,MAAM,cAAc,GAAG,UAAU,CAAC;;;;;CAKjC,CAAC;AAEF;;;GAGG;AACH,MAAM,eAAe,GAAG,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;CAsBlC,CAAC;AAEF;;;GAGG;AACH,MAAM,kBAAkB,GAAG,UAAU,CAAC;;;;;;;;;;;;;;;;;CAiBrC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,wCAAwC;IACvD,OAAO,UAAU,CAAC;;;;;;;;;;EAUjB,cAAc;EACd,eAAe;;;;;;;;;;;;;;;;;;;;;CAqBhB,CAAC;AACF,CAAC;AAED;;;;;;GAMG;AACH,SAAS,0BAA0B,CAAC,IAAY,EAAE,SAAiB;IAClE,OAAO,UAAU,CAAC;;;;;;;;;;;;;;;;;qCAiBkB,IAAI;;;;;;;;;;;;;;;;;;;;MAoBnC,SAAS;;;;;;CAMd,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;GAYG;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;GAOG;AACH,MAAM,UAAU,iCAAiC,CAAC,cAA8B;IAC/E,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QAChC,OAAO;IACR,CAAC;IAED,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAElC,IAAI,cAAc,KAAK,cAAc,CAAC,IAAI,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,gCAAgC,EAAE,CAAC;QAEnD,WAAW,CAAC,gBAAgB,CAAC,GAAG,uCAAuC,aAAa,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;QAC5G,WAAW,CAAC,gBAAgB,CAAC,GAAG,sCAAsC,aAAa,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;QAC1G,WAAW,CAAC,gBAAgB,CAAC,GAAG,gCAAgC,aAAa,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;QAC9F,WAAW,CAAC,gBAAgB,CAAC,GAAG,mCAAmC,aAAa,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;QAEpG,OAAO;IACR,CAAC;IAED,WAAW,CAAC,YAAY,CAAC,GAAG,uCAAuC,aAAa,CAAC,GAAG,wCAAwC,EAAE,CAAC;IAC/H,WAAW,CAAC,YAAY,CAAC,GAAG,sCAAsC,aAAa,CAAC,GAAG,uCAAuC,CAAC,wBAAwB,CAAC,CAAC;IACrJ,WAAW,CAAC,YAAY,CAAC,GAAG,gCAAgC,aAAa,CAAC,GAAG,iCAAiC,EAAE,CAAC;IACjH,WAAW,CAAC,YAAY,CAAC,GAAG,mCAAmC,aAAa,CAAC,GAAG,oCAAoC,EAAE,CAAC;AACxH,CAAC"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the key used to store the per-light volumetric lighting configuration in the metadata of a light.
|
|
3
|
+
* Storing the configuration in the metadata of the light is what makes it survive the save/load round trip
|
|
4
|
+
* for free (metadata is serialized by "Light.serialize" and restored by "Light.Parse") including for lights
|
|
5
|
+
* that live inside a clustered light container and are, as a result, not part of "scene.lights" anymore.
|
|
6
|
+
*/
|
|
7
|
+
export const volumetricLightMetadataKey = "volumetricLighting";
|
|
8
|
+
/**
|
|
9
|
+
* Defines the maximum number of shadowed lights the raymarching shader can be compiled for.
|
|
10
|
+
* The effective count is computed at runtime from the capabilities of the engine.
|
|
11
|
+
*/
|
|
12
|
+
export const maxVolumetricShadowSlots = 8;
|
|
13
|
+
/**
|
|
14
|
+
* Defines the maximum number of unshadowed lights the raymarching shader can be compiled for.
|
|
15
|
+
* The effective count is computed at runtime from the capabilities of the engine.
|
|
16
|
+
*/
|
|
17
|
+
export const maxVolumetricArrayLights = 256;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the maximum number of unshadowed directional lights the raymarching shader evaluates. Unlike the
|
|
20
|
+
* point and spot lights, a directional light lights the whole view ray, so each one costs a full march.
|
|
21
|
+
*/
|
|
22
|
+
export const maxVolumetricDirectionalLights = 4;
|
|
23
|
+
/**
|
|
24
|
+
* Defines the available step distributions used while raymarching the participating medium.
|
|
25
|
+
*/
|
|
26
|
+
export var VolumetricStepDistribution;
|
|
27
|
+
(function (VolumetricStepDistribution) {
|
|
28
|
+
/**
|
|
29
|
+
* All steps have the same length. Gives the best results for a medium that is mostly uniform.
|
|
30
|
+
*/
|
|
31
|
+
VolumetricStepDistribution[VolumetricStepDistribution["Linear"] = 0] = "Linear";
|
|
32
|
+
/**
|
|
33
|
+
* Steps grow exponentially with the distance to the camera. Gives more precision near the camera
|
|
34
|
+
* where the perspective projection makes artifacts the most visible.
|
|
35
|
+
*/
|
|
36
|
+
VolumetricStepDistribution[VolumetricStepDistribution["Exponential"] = 1] = "Exponential";
|
|
37
|
+
})(VolumetricStepDistribution || (VolumetricStepDistribution = {}));
|
|
38
|
+
/**
|
|
39
|
+
* Defines the available dithering modes used to hide the banding produced by a low step count.
|
|
40
|
+
*/
|
|
41
|
+
export var VolumetricDitherMode;
|
|
42
|
+
(function (VolumetricDitherMode) {
|
|
43
|
+
/**
|
|
44
|
+
* No dithering at all. Banding will be visible unless the step count is very high.
|
|
45
|
+
*/
|
|
46
|
+
VolumetricDitherMode[VolumetricDitherMode["None"] = 0] = "None";
|
|
47
|
+
/**
|
|
48
|
+
* Static 4x4 ordered (Bayer) matrix. Stable over time, best when no temporal anti-aliasing is used.
|
|
49
|
+
*/
|
|
50
|
+
VolumetricDitherMode[VolumetricDitherMode["Bayer"] = 1] = "Bayer";
|
|
51
|
+
/**
|
|
52
|
+
* Interleaved gradient noise. Converges to the ground truth when temporal anti-aliasing is enabled.
|
|
53
|
+
*/
|
|
54
|
+
VolumetricDitherMode[VolumetricDitherMode["InterleavedGradientNoise"] = 2] = "InterleavedGradientNoise";
|
|
55
|
+
})(VolumetricDitherMode || (VolumetricDitherMode = {}));
|
|
56
|
+
/**
|
|
57
|
+
* Defines how the density of the participating medium evolves with the distance to the camera.
|
|
58
|
+
* These are the same three models the fog of Babylon.js uses, but the volumetric lighting owns its own
|
|
59
|
+
* values: the medium the light shafts are computed in is independent from the fog applied on the surfaces.
|
|
60
|
+
*/
|
|
61
|
+
export var VolumetricFogMode;
|
|
62
|
+
(function (VolumetricFogMode) {
|
|
63
|
+
/**
|
|
64
|
+
* Uniform medium. The transmittance falls as e^(-distance * density).
|
|
65
|
+
*/
|
|
66
|
+
VolumetricFogMode[VolumetricFogMode["Exponential"] = 0] = "Exponential";
|
|
67
|
+
/**
|
|
68
|
+
* The medium gets denser with the distance. The transmittance falls as e^(-(distance * density)^2).
|
|
69
|
+
*/
|
|
70
|
+
VolumetricFogMode[VolumetricFogMode["ExponentialSquared"] = 1] = "ExponentialSquared";
|
|
71
|
+
/**
|
|
72
|
+
* The medium fades in linearly between "fogStart" and "fogEnd", which fully hides anything past the end.
|
|
73
|
+
*/
|
|
74
|
+
VolumetricFogMode[VolumetricFogMode["Linear"] = 2] = "Linear";
|
|
75
|
+
})(VolumetricFogMode || (VolumetricFogMode = {}));
|
|
76
|
+
/**
|
|
77
|
+
* Defines the available debug outputs of the volumetric lighting rendering pipeline.
|
|
78
|
+
*/
|
|
79
|
+
export var VolumetricDebugMode;
|
|
80
|
+
(function (VolumetricDebugMode) {
|
|
81
|
+
/**
|
|
82
|
+
* No debug, the scattering is composed over the scene color.
|
|
83
|
+
*/
|
|
84
|
+
VolumetricDebugMode[VolumetricDebugMode["None"] = 0] = "None";
|
|
85
|
+
/**
|
|
86
|
+
* Outputs the raw in-scattering buffer.
|
|
87
|
+
*/
|
|
88
|
+
VolumetricDebugMode[VolumetricDebugMode["Scattering"] = 1] = "Scattering";
|
|
89
|
+
/**
|
|
90
|
+
* Outputs the transmittance of the medium.
|
|
91
|
+
*/
|
|
92
|
+
VolumetricDebugMode[VolumetricDebugMode["Transmittance"] = 2] = "Transmittance";
|
|
93
|
+
/**
|
|
94
|
+
* Outputs a heat map of the number of lights evaluated per pixel.
|
|
95
|
+
*/
|
|
96
|
+
VolumetricDebugMode[VolumetricDebugMode["LightCount"] = 3] = "LightCount";
|
|
97
|
+
})(VolumetricDebugMode || (VolumetricDebugMode = {}));
|
|
98
|
+
/**
|
|
99
|
+
* Returns the default volumetric lighting configuration of a light.
|
|
100
|
+
*/
|
|
101
|
+
export function getDefaultVolumetricLightConfiguration() {
|
|
102
|
+
return {
|
|
103
|
+
enabled: false,
|
|
104
|
+
volumeIntensity: 1,
|
|
105
|
+
anisotropy: 0.35,
|
|
106
|
+
useCustomColor: false,
|
|
107
|
+
color: [1, 1, 1],
|
|
108
|
+
castVolumetricShadows: true,
|
|
109
|
+
shadowDarkness: 1,
|
|
110
|
+
rangeMultiplier: 1,
|
|
111
|
+
priority: 0,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns the default configuration of the volumetric lighting rendering pipeline.
|
|
116
|
+
*/
|
|
117
|
+
export function getDefaultVolumetricLightingConfiguration() {
|
|
118
|
+
return {
|
|
119
|
+
steps: 40,
|
|
120
|
+
lightSteps: 0,
|
|
121
|
+
resolutionScale: 0.5,
|
|
122
|
+
stepDistribution: VolumetricStepDistribution.Exponential,
|
|
123
|
+
ditherMode: VolumetricDitherMode.InterleavedGradientNoise,
|
|
124
|
+
ditherStrength: 1,
|
|
125
|
+
temporalJitter: false,
|
|
126
|
+
fogMode: VolumetricFogMode.Exponential,
|
|
127
|
+
fogDensity: 0.0005,
|
|
128
|
+
fogStart: 0,
|
|
129
|
+
fogEnd: 2000,
|
|
130
|
+
fogColor: [1, 1, 1],
|
|
131
|
+
albedo: 1,
|
|
132
|
+
maxDistance: 10_000,
|
|
133
|
+
heightFogEnabled: false,
|
|
134
|
+
heightFogBaseHeight: 0,
|
|
135
|
+
heightFogFalloff: 0.01,
|
|
136
|
+
intensity: 1.5,
|
|
137
|
+
lightExtinctionEnabled: true,
|
|
138
|
+
lightExtinctionClamp: 1000,
|
|
139
|
+
extinctionAmount: 0,
|
|
140
|
+
ambientColor: [1, 1, 1],
|
|
141
|
+
ambientIntensity: 0,
|
|
142
|
+
screenSpaceShadows: true,
|
|
143
|
+
screenSpaceShadowSteps: 6,
|
|
144
|
+
screenSpaceShadowBias: 0.02,
|
|
145
|
+
screenSpaceShadowMaxDistance: 2000,
|
|
146
|
+
screenSpaceShadowThickness: 4,
|
|
147
|
+
blurPasses: 2,
|
|
148
|
+
blurRadius: 3,
|
|
149
|
+
blurDepthThreshold: 0.02,
|
|
150
|
+
upsampleDepthThreshold: 0.02,
|
|
151
|
+
maxLights: 128,
|
|
152
|
+
maxShadowedLights: 4,
|
|
153
|
+
pcfTaps: 4,
|
|
154
|
+
selectionRefreshRate: 2,
|
|
155
|
+
debugMode: VolumetricDebugMode.None,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Returns the number of samples taken across the volume of each point and spot light, resolving the
|
|
160
|
+
* automatic value derived from the number of steps of the raymarching.
|
|
161
|
+
* @param configuration defines the configuration of the pipeline.
|
|
162
|
+
*/
|
|
163
|
+
export function getVolumetricLightSteps(configuration) {
|
|
164
|
+
if (configuration.lightSteps > 0) {
|
|
165
|
+
return configuration.lightSteps;
|
|
166
|
+
}
|
|
167
|
+
return Math.max(4, Math.min(64, Math.round(configuration.steps * 0.3)));
|
|
168
|
+
}
|
|
169
|
+
function normalizeNumber(value, defaultValue, min, max) {
|
|
170
|
+
const result = typeof value === "number" && isFinite(value) ? value : defaultValue;
|
|
171
|
+
return Math.min(max, Math.max(min, result));
|
|
172
|
+
}
|
|
173
|
+
function normalizeColor(value, defaultValue) {
|
|
174
|
+
if (!Array.isArray(value) || value.length < 3) {
|
|
175
|
+
return defaultValue.slice();
|
|
176
|
+
}
|
|
177
|
+
return [normalizeNumber(value[0], defaultValue[0], 0, 100), normalizeNumber(value[1], defaultValue[1], 0, 100), normalizeNumber(value[2], defaultValue[2], 0, 100)];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Normalizes the given serialized per-light volumetric configuration by merging it over the default one.
|
|
181
|
+
* This is what makes projects saved by an older version of the editor load without any migration step.
|
|
182
|
+
* @param data defines the serialized configuration to normalize.
|
|
183
|
+
*/
|
|
184
|
+
export function normalizeVolumetricLightConfiguration(data) {
|
|
185
|
+
const defaults = getDefaultVolumetricLightConfiguration();
|
|
186
|
+
if (!data || typeof data !== "object") {
|
|
187
|
+
return defaults;
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
enabled: data.enabled ?? defaults.enabled,
|
|
191
|
+
volumeIntensity: normalizeNumber(data.volumeIntensity, defaults.volumeIntensity, 0, 1000),
|
|
192
|
+
anisotropy: normalizeNumber(data.anisotropy, defaults.anisotropy, -0.95, 0.95),
|
|
193
|
+
useCustomColor: data.useCustomColor ?? defaults.useCustomColor,
|
|
194
|
+
color: normalizeColor(data.color, defaults.color),
|
|
195
|
+
castVolumetricShadows: data.castVolumetricShadows ?? defaults.castVolumetricShadows,
|
|
196
|
+
shadowDarkness: normalizeNumber(data.shadowDarkness, defaults.shadowDarkness, 0, 1),
|
|
197
|
+
rangeMultiplier: normalizeNumber(data.rangeMultiplier, defaults.rangeMultiplier, 0, 100),
|
|
198
|
+
priority: normalizeNumber(data.priority, defaults.priority, -1000, 1000),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Normalizes the given serialized pipeline configuration by merging it over the default one.
|
|
203
|
+
* @param data defines the serialized configuration to normalize.
|
|
204
|
+
*/
|
|
205
|
+
export function normalizeVolumetricLightingConfiguration(data) {
|
|
206
|
+
const defaults = getDefaultVolumetricLightingConfiguration();
|
|
207
|
+
if (!data || typeof data !== "object") {
|
|
208
|
+
return defaults;
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
steps: Math.round(normalizeNumber(data.steps, defaults.steps, 4, 256)),
|
|
212
|
+
lightSteps: Math.round(normalizeNumber(data.lightSteps, defaults.lightSteps, 0, 128)),
|
|
213
|
+
resolutionScale: normalizeNumber(data.resolutionScale, defaults.resolutionScale, 0.1, 1),
|
|
214
|
+
stepDistribution: Math.round(normalizeNumber(data.stepDistribution, defaults.stepDistribution, 0, 1)),
|
|
215
|
+
ditherMode: Math.round(normalizeNumber(data.ditherMode, defaults.ditherMode, 0, 2)),
|
|
216
|
+
ditherStrength: normalizeNumber(data.ditherStrength, defaults.ditherStrength, 0, 1),
|
|
217
|
+
temporalJitter: data.temporalJitter ?? defaults.temporalJitter,
|
|
218
|
+
fogMode: Math.round(normalizeNumber(data.fogMode, defaults.fogMode, 0, 2)),
|
|
219
|
+
fogDensity: normalizeNumber(data.fogDensity, defaults.fogDensity, 0, 100),
|
|
220
|
+
fogStart: normalizeNumber(data.fogStart, defaults.fogStart, 0, 1_000_000),
|
|
221
|
+
// The linear mode divides by "fogEnd - fogStart" and its extinction has a pole at "fogEnd", so an end
|
|
222
|
+
// at or before the start would make the medium either vanish or turn instantly opaque.
|
|
223
|
+
fogEnd: Math.max(normalizeNumber(data.fogEnd, defaults.fogEnd, 0, 10_000_000), normalizeNumber(data.fogStart, defaults.fogStart, 0, 1_000_000) + 1e-3),
|
|
224
|
+
fogColor: normalizeColor(data.fogColor, defaults.fogColor),
|
|
225
|
+
albedo: normalizeNumber(data.albedo, defaults.albedo, 0, 1),
|
|
226
|
+
maxDistance: normalizeNumber(data.maxDistance, defaults.maxDistance, 1, 1_000_000),
|
|
227
|
+
heightFogEnabled: data.heightFogEnabled ?? defaults.heightFogEnabled,
|
|
228
|
+
heightFogBaseHeight: normalizeNumber(data.heightFogBaseHeight, defaults.heightFogBaseHeight, -1_000_000, 1_000_000),
|
|
229
|
+
heightFogFalloff: normalizeNumber(data.heightFogFalloff, defaults.heightFogFalloff, 0, 10),
|
|
230
|
+
intensity: normalizeNumber(data.intensity, defaults.intensity, 0, 100),
|
|
231
|
+
lightExtinctionEnabled: data.lightExtinctionEnabled ?? defaults.lightExtinctionEnabled,
|
|
232
|
+
lightExtinctionClamp: normalizeNumber(data.lightExtinctionClamp, defaults.lightExtinctionClamp, 0, 1_000_000),
|
|
233
|
+
extinctionAmount: normalizeNumber(data.extinctionAmount, defaults.extinctionAmount, 0, 1),
|
|
234
|
+
ambientColor: normalizeColor(data.ambientColor, defaults.ambientColor),
|
|
235
|
+
ambientIntensity: normalizeNumber(data.ambientIntensity, defaults.ambientIntensity, 0, 100),
|
|
236
|
+
screenSpaceShadows: data.screenSpaceShadows ?? defaults.screenSpaceShadows,
|
|
237
|
+
screenSpaceShadowSteps: Math.round(normalizeNumber(data.screenSpaceShadowSteps, defaults.screenSpaceShadowSteps, 1, 32)),
|
|
238
|
+
screenSpaceShadowBias: normalizeNumber(data.screenSpaceShadowBias, defaults.screenSpaceShadowBias, 0, 1),
|
|
239
|
+
screenSpaceShadowMaxDistance: normalizeNumber(data.screenSpaceShadowMaxDistance, defaults.screenSpaceShadowMaxDistance, 1, 10_000_000),
|
|
240
|
+
screenSpaceShadowThickness: normalizeNumber(data.screenSpaceShadowThickness, defaults.screenSpaceShadowThickness, 0.01, 1000),
|
|
241
|
+
blurPasses: Math.round(normalizeNumber(data.blurPasses, defaults.blurPasses, 0, 2)),
|
|
242
|
+
blurRadius: Math.round(normalizeNumber(data.blurRadius, defaults.blurRadius, 1, 6)),
|
|
243
|
+
blurDepthThreshold: normalizeNumber(data.blurDepthThreshold, defaults.blurDepthThreshold, 0.0001, 1),
|
|
244
|
+
upsampleDepthThreshold: normalizeNumber(data.upsampleDepthThreshold, defaults.upsampleDepthThreshold, 0.0001, 1),
|
|
245
|
+
maxLights: Math.round(normalizeNumber(data.maxLights, defaults.maxLights, 0, maxVolumetricArrayLights)),
|
|
246
|
+
maxShadowedLights: Math.round(normalizeNumber(data.maxShadowedLights, defaults.maxShadowedLights, 0, maxVolumetricShadowSlots)),
|
|
247
|
+
pcfTaps: normalizeNumber(data.pcfTaps, defaults.pcfTaps, 1, 4) >= 4 ? 4 : 1,
|
|
248
|
+
selectionRefreshRate: Math.round(normalizeNumber(data.selectionRefreshRate, defaults.selectionRefreshRate, 1, 60)),
|
|
249
|
+
debugMode: Math.round(normalizeNumber(data.debugMode, defaults.debugMode, 0, 3)),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Keeps the configurations that were already completed with the default values, so the selection pass of
|
|
254
|
+
* the pipeline, which reads the configuration of every light a few times per second, doesn't allocate.
|
|
255
|
+
*/
|
|
256
|
+
const completedVolumetricLightConfigurations = new WeakSet();
|
|
257
|
+
/**
|
|
258
|
+
* Returns the volumetric lighting configuration stored in the metadata of the given light and creates
|
|
259
|
+
* it using the default values if it doesn't exist yet.
|
|
260
|
+
*
|
|
261
|
+
* The object stored in the metadata is completed in place instead of being replaced: the inspector and the
|
|
262
|
+
* undo/redo stack keep references on it, and replacing it would silently break them.
|
|
263
|
+
* @param light defines the reference to the light to ensure its volumetric lighting configuration.
|
|
264
|
+
*/
|
|
265
|
+
export function ensureVolumetricLightConfiguration(light) {
|
|
266
|
+
light.metadata ??= {};
|
|
267
|
+
const existing = light.metadata[volumetricLightMetadataKey];
|
|
268
|
+
if (!existing || typeof existing !== "object") {
|
|
269
|
+
light.metadata[volumetricLightMetadataKey] = normalizeVolumetricLightConfiguration(null);
|
|
270
|
+
completedVolumetricLightConfigurations.add(light.metadata[volumetricLightMetadataKey]);
|
|
271
|
+
return light.metadata[volumetricLightMetadataKey];
|
|
272
|
+
}
|
|
273
|
+
if (completedVolumetricLightConfigurations.has(existing)) {
|
|
274
|
+
return existing;
|
|
275
|
+
}
|
|
276
|
+
// Fills the keys a newer version of the editor may have added since the project was saved.
|
|
277
|
+
const defaults = getDefaultVolumetricLightConfiguration();
|
|
278
|
+
Object.keys(defaults).forEach((key) => {
|
|
279
|
+
if (existing[key] === undefined) {
|
|
280
|
+
existing[key] = defaults[key];
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
completedVolumetricLightConfigurations.add(existing);
|
|
284
|
+
return existing;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Returns the volumetric lighting configuration stored in the metadata of the given light, if any.
|
|
288
|
+
* @param light defines the reference to the light to get its volumetric lighting configuration.
|
|
289
|
+
*/
|
|
290
|
+
export function getVolumetricLightConfiguration(light) {
|
|
291
|
+
const data = light.metadata?.[volumetricLightMetadataKey];
|
|
292
|
+
return data && typeof data === "object" ? ensureVolumetricLightConfiguration(light) : null;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Returns wether or not the given light contributes to the volumetric lighting.
|
|
296
|
+
* @param light defines the reference to the light to check.
|
|
297
|
+
*/
|
|
298
|
+
export function isVolumetricLightEnabled(light) {
|
|
299
|
+
return light.metadata?.[volumetricLightMetadataKey]?.enabled === true;
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/rendering/volumetric/types.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,oBAAoB,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,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AAQ,CAAC,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED,2FAA2F;IAC3F,MAAM,QAAQ,GAAG,sCAAsC,EAAE,CAAC;IAC1D,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACrC,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YACjC,QAAQ,CAAC,GAAG,CAAC,GAAI,QAAgB,CAAC,GAAG,CAAC,CAAC;QACxC,CAAC;IACF,CAAC,CAAC,CAAC;IAEH,sCAAsC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAErD,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,KAAY;IAC3D,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,0BAA0B,CAAC,CAAC;IAC1D,OAAO,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,kCAAkC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAY;IACpD,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC,0BAA0B,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { VolumetricLightingRenderingPipeline } from "./volumetric/pipeline";
|
|
2
|
+
import { normalizeVolumetricLightingConfiguration } from "./volumetric/types";
|
|
3
|
+
let volumetricLightingRenderingPipeline = null;
|
|
4
|
+
/**
|
|
5
|
+
* Defines the configuration of the volumetric lighting rendering pipeline per camera.
|
|
6
|
+
*/
|
|
7
|
+
export const volumetricLightingRenderingPipelineCameraConfigurations = new Map();
|
|
8
|
+
export function getVolumetricLightingRenderingPipeline() {
|
|
9
|
+
// Babylon.js disposes a rendering pipeline on its own as soon as one of its post-processes fails to
|
|
10
|
+
// compile. Without this the editor would keep reporting the effect as enabled while nothing renders.
|
|
11
|
+
if (volumetricLightingRenderingPipeline?.isDisposed) {
|
|
12
|
+
volumetricLightingRenderingPipeline = null;
|
|
13
|
+
}
|
|
14
|
+
return volumetricLightingRenderingPipeline;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Sets the reference to the default rendering pipeline.
|
|
18
|
+
* @access editor only.
|
|
19
|
+
*/
|
|
20
|
+
export function setVolumetricLightingRenderingPipelineRef(pipeline) {
|
|
21
|
+
volumetricLightingRenderingPipeline = pipeline;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns wether or not the volumetric lighting rendering pipeline is supported by the engine of the scene.
|
|
25
|
+
* Both WebGL 2 and WebGPU are supported, each with its own hand written version of the shaders.
|
|
26
|
+
* @param scene defines the reference to the scene to check.
|
|
27
|
+
*/
|
|
28
|
+
export function isVolumetricLightingSupported(scene) {
|
|
29
|
+
const engine = scene?.getEngine();
|
|
30
|
+
return engine ? VolumetricLightingRenderingPipeline.IsSupported(engine) : false;
|
|
31
|
+
}
|
|
32
|
+
export function disposeVolumetricLightingRenderingPipeline() {
|
|
33
|
+
if (volumetricLightingRenderingPipeline) {
|
|
34
|
+
volumetricLightingRenderingPipeline.dispose();
|
|
35
|
+
volumetricLightingRenderingPipeline = null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function createVolumetricLightingRenderingPipeline(scene, camera) {
|
|
39
|
+
volumetricLightingRenderingPipeline = new VolumetricLightingRenderingPipeline("VolumetricLightingRenderingPipeline", scene, camera);
|
|
40
|
+
return volumetricLightingRenderingPipeline;
|
|
41
|
+
}
|
|
42
|
+
export function serializeVolumetricLightingRenderingPipeline() {
|
|
43
|
+
if (!volumetricLightingRenderingPipeline) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return volumetricLightingRenderingPipeline.serializeConfiguration();
|
|
47
|
+
}
|
|
48
|
+
export function parseVolumetricLightingRenderingPipeline(scene, camera, data) {
|
|
49
|
+
const pipeline = getVolumetricLightingRenderingPipeline() ?? createVolumetricLightingRenderingPipeline(scene, camera);
|
|
50
|
+
// A project saved before the medium was derived from the size of the scene has no value stored for it,
|
|
51
|
+
// and the static defaults would be wrong for anything but a scene authored in centimetres.
|
|
52
|
+
const configuration = { ...data };
|
|
53
|
+
if (configuration.fogDensity === undefined) {
|
|
54
|
+
configuration.fogDensity = VolumetricLightingRenderingPipeline.GetDefaultFogDensity(pipeline.scene, pipeline.camera);
|
|
55
|
+
}
|
|
56
|
+
if (configuration.fogEnd === undefined) {
|
|
57
|
+
configuration.fogEnd = VolumetricLightingRenderingPipeline.GetDefaultFogEnd(pipeline.scene, pipeline.camera);
|
|
58
|
+
}
|
|
59
|
+
if (configuration.screenSpaceShadowMaxDistance === undefined) {
|
|
60
|
+
configuration.screenSpaceShadowMaxDistance = VolumetricLightingRenderingPipeline.GetDefaultFogEnd(pipeline.scene, pipeline.camera);
|
|
61
|
+
}
|
|
62
|
+
pipeline.applyConfiguration(normalizeVolumetricLightingConfiguration(configuration));
|
|
63
|
+
return pipeline;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Marks the list of lights contributing to the volumetric lighting as dirty. Called when the volumetric
|
|
67
|
+
* configuration of a light is edited so the effect updates without waiting for the next selection pass.
|
|
68
|
+
*/
|
|
69
|
+
export function markVolumetricLightsDirty() {
|
|
70
|
+
volumetricLightingRenderingPipeline?.markLightsDirty();
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=volumetric-lighting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volumetric-lighting.js","sourceRoot":"","sources":["../../../src/rendering/volumetric-lighting.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mCAAmC,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAoC,wCAAwC,EAAE,MAAM,oBAAoB,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C,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAEtH,uGAAuG;IACvG,2FAA2F;IAC3F,MAAM,aAAa,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;IAClC,IAAI,aAAa,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QAC5C,aAAa,CAAC,UAAU,GAAG,mCAAmC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtH,CAAC;IACD,IAAI,aAAa,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACxC,aAAa,CAAC,MAAM,GAAG,mCAAmC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9G,CAAC;IACD,IAAI,aAAa,CAAC,4BAA4B,KAAK,SAAS,EAAE,CAAC;QAC9D,aAAa,CAAC,4BAA4B,GAAG,mCAAmC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpI,CAAC;IAED,QAAQ,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,aAAa,CAAqC,CAAC,CAAC;IAEzH,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACxC,mCAAmC,EAAE,eAAe,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -137,6 +137,20 @@ export function isLight(object) {
|
|
|
137
137
|
}
|
|
138
138
|
return false;
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns wether or not the given object is a ShadowGenerator.
|
|
142
|
+
* @param object defines the reference to the object to test its class name.
|
|
143
|
+
*/
|
|
144
|
+
export function isShadowGenerator(object) {
|
|
145
|
+
return object.getClassName?.() === "ShadowGenerator";
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns wether or not the given object is a CascadedShadowGenerator.
|
|
149
|
+
* @param object defines the reference to the object to test its class name.
|
|
150
|
+
*/
|
|
151
|
+
export function isCascadedShadowGenerator(object) {
|
|
152
|
+
return object.getClassName?.() === "CascadedShadowGenerator";
|
|
153
|
+
}
|
|
140
154
|
/**
|
|
141
155
|
* Returns wether or not the given object is a ClusteredLightContainer.
|
|
142
156
|
* @param object defines the reference to the object to test its class name.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../src/tools/guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../src/tools/guards.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAW;IACzC,QAAQ,MAAM,CAAC,YAAY,EAAE,EAAE,EAAE,CAAC;QACjC,KAAK,MAAM,CAAC;QACZ,KAAK,UAAU,CAAC;QAChB,KAAK,YAAY,CAAC;QAClB,KAAK,eAAe;YACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,MAAW;IACjC,QAAQ,MAAM,CAAC,YAAY,EAAE,EAAE,EAAE,CAAC;QACjC,KAAK,MAAM,CAAC;QACZ,KAAK,YAAY;YAChB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,MAAW;IAC1C,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,eAAe,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,MAAW;IACjC,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,MAAM,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,MAAW;IACvC,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,YAAY,CAAC;AACjD,CAAC;A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E,EAAE,KAAK,gBAAgB,CAAC;AACrD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAW;IAC9C,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,mBAAmB,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAW;IAC9C,QAAQ,MAAM,CAAC,YAAY,EAAE,EAAE,EAAE,CAAC;QACjC,KAAK,gBAAgB,CAAC;QACtB,KAAK,mBAAmB;YACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAW;IACnC,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,QAAQ,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAAW;IACtC,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,WAAW,CAAC;AAChD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAW;IAClD,OAAO,MAAM,CAAC,YAAY,EAAE,EAAE,KAAK,uBAAuB,CAAC;AAC5D,CAAC"}
|
|
@@ -22,7 +22,11 @@ export * from "./rendering/taa";
|
|
|
22
22
|
export * from "./rendering/ssao";
|
|
23
23
|
export * from "./rendering/motion-blur";
|
|
24
24
|
export * from "./rendering/default-pipeline";
|
|
25
|
+
export * from "./rendering/volumetric-lighting";
|
|
25
26
|
export * from "./rendering/tools";
|
|
27
|
+
export * from "./rendering/volumetric/types";
|
|
28
|
+
export * from "./rendering/volumetric/selector";
|
|
29
|
+
export * from "./rendering/volumetric/pipeline";
|
|
26
30
|
export * from "./decorators/scene";
|
|
27
31
|
export * from "./decorators/gui";
|
|
28
32
|
export * from "./decorators/sound";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerMeshParser(): void;
|