@onerjs/core 8.26.3 → 8.26.4
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/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +0 -6
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraphContext.d.ts +1 -2
- package/FrameGraph/frameGraphContext.js +1 -4
- package/FrameGraph/frameGraphContext.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.js +5 -4
- package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
- package/Lights/pointLight.js +4 -4
- package/Lights/pointLight.js.map +1 -1
- package/Lights/rectAreaLight.js +4 -4
- package/Lights/rectAreaLight.js.map +1 -1
- package/Lights/spotLight.js +2 -2
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Background/backgroundMaterial.d.ts +91 -19
- package/Materials/Background/backgroundMaterial.js +245 -17
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +4 -15
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +5 -28
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +69 -57
- package/Materials/Node/nodeMaterial.js +86 -9
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +1 -3
- package/Materials/Node/nodeMaterialBuildState.js +15 -35
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/PBR/index.d.ts +0 -5
- package/Materials/PBR/index.js +0 -5
- package/Materials/PBR/index.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +43 -57
- package/Materials/PBR/pbrBaseMaterial.js +304 -21
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +78 -0
- package/Materials/PBR/pbrMaterial.js +110 -0
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/imageProcessingConfiguration.defines.d.ts +0 -25
- package/Materials/imageProcessingConfiguration.defines.js +0 -27
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
- package/Materials/index.d.ts +0 -2
- package/Materials/index.js +0 -2
- package/Materials/index.js.map +1 -1
- package/Materials/material.d.ts +0 -14
- package/Materials/material.js +0 -14
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +0 -53
- package/Materials/materialHelper.functions.js +0 -297
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/standardMaterial.d.ts +121 -57
- package/Materials/standardMaterial.js +250 -21
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +0 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Misc/decorators.d.ts +0 -7
- package/Misc/decorators.js +0 -34
- package/Misc/decorators.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js +1 -10
- package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -1
- package/Particles/Node/Blocks/index.d.ts +0 -2
- package/Particles/Node/Blocks/index.js +0 -2
- package/Particles/Node/Blocks/index.js.map +1 -1
- package/Particles/Node/Blocks/particleInputBlock.js +1 -4
- package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.d.ts +1 -2
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +0 -45
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +1 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +4 -6
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/iblCdfGenerator.js +20 -28
- package/Rendering/iblCdfGenerator.js.map +1 -1
- package/Rendering/reflectiveShadowMap.d.ts +3 -3
- package/Shaders/ShadersInclude/backgroundUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/clusteredLightingFunctions.js +1 -3
- package/Shaders/ShadersInclude/clusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +0 -34
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/importanceSampling.js +0 -4
- package/Shaders/ShadersInclude/importanceSampling.js.map +1 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +0 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +0 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -3
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrHelperFunctions.js +0 -2
- package/Shaders/ShadersInclude/pbrHelperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +0 -28
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/importanceSampling.js +0 -4
- package/ShadersWGSL/ShadersInclude/importanceSampling.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -3
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +0 -2
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +0 -21
- package/scene.js +3 -29
- package/scene.js.map +1 -1
- package/Materials/PBR/openPbrMaterial.d.ts +0 -998
- package/Materials/PBR/openPbrMaterial.js +0 -2069
- package/Materials/PBR/openPbrMaterial.js.map +0 -1
- package/Materials/floatingOriginMatrixOverrides.d.ts +0 -3
- package/Materials/floatingOriginMatrixOverrides.js +0 -91
- package/Materials/floatingOriginMatrixOverrides.js.map +0 -1
- package/Materials/imageProcessing.d.ts +0 -65
- package/Materials/imageProcessing.js +0 -162
- package/Materials/imageProcessing.js.map +0 -1
- package/Materials/uv.defines.d.ts +0 -22
- package/Materials/uv.defines.js +0 -24
- package/Materials/uv.defines.js.map +0 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.d.ts +0 -38
- package/Particles/Node/Blocks/particleLocalVariableBlock.js +0 -108
- package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +0 -1
- package/Particles/Node/Blocks/particleVectorLengthBlock.d.ts +0 -26
- package/Particles/Node/Blocks/particleVectorLengthBlock.js +0 -50
- package/Particles/Node/Blocks/particleVectorLengthBlock.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Nullable } from "../../types.js";
|
|
2
2
|
import type { Scene } from "../../scene.js";
|
|
3
3
|
import { Color3 } from "../../Maths/math.color.js";
|
|
4
|
+
import type { ImageProcessingConfiguration } from "../../Materials/imageProcessingConfiguration.js";
|
|
5
|
+
import type { ColorCurves } from "../../Materials/colorCurves.js";
|
|
4
6
|
import type { BaseTexture } from "../../Materials/Textures/baseTexture.js";
|
|
5
7
|
import { PBRBaseMaterial } from "./pbrBaseMaterial.js";
|
|
6
8
|
/**
|
|
@@ -387,6 +389,82 @@ export declare class PBRMaterial extends PBRBaseMaterial {
|
|
|
387
389
|
* If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)
|
|
388
390
|
*/
|
|
389
391
|
applyDecalMapAfterDetailMap: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Gets the image processing configuration used either in this material.
|
|
394
|
+
*/
|
|
395
|
+
get imageProcessingConfiguration(): ImageProcessingConfiguration;
|
|
396
|
+
/**
|
|
397
|
+
* Sets the Default image processing configuration used either in the this material.
|
|
398
|
+
*
|
|
399
|
+
* If sets to null, the scene one is in use.
|
|
400
|
+
*/
|
|
401
|
+
set imageProcessingConfiguration(value: ImageProcessingConfiguration);
|
|
402
|
+
/**
|
|
403
|
+
* Gets whether the color curves effect is enabled.
|
|
404
|
+
*/
|
|
405
|
+
get cameraColorCurvesEnabled(): boolean;
|
|
406
|
+
/**
|
|
407
|
+
* Sets whether the color curves effect is enabled.
|
|
408
|
+
*/
|
|
409
|
+
set cameraColorCurvesEnabled(value: boolean);
|
|
410
|
+
/**
|
|
411
|
+
* Gets whether the color grading effect is enabled.
|
|
412
|
+
*/
|
|
413
|
+
get cameraColorGradingEnabled(): boolean;
|
|
414
|
+
/**
|
|
415
|
+
* Gets whether the color grading effect is enabled.
|
|
416
|
+
*/
|
|
417
|
+
set cameraColorGradingEnabled(value: boolean);
|
|
418
|
+
/**
|
|
419
|
+
* Gets whether tonemapping is enabled or not.
|
|
420
|
+
*/
|
|
421
|
+
get cameraToneMappingEnabled(): boolean;
|
|
422
|
+
/**
|
|
423
|
+
* Sets whether tonemapping is enabled or not
|
|
424
|
+
*/
|
|
425
|
+
set cameraToneMappingEnabled(value: boolean);
|
|
426
|
+
/**
|
|
427
|
+
* The camera exposure used on this material.
|
|
428
|
+
* This property is here and not in the camera to allow controlling exposure without full screen post process.
|
|
429
|
+
* This corresponds to a photographic exposure.
|
|
430
|
+
*/
|
|
431
|
+
get cameraExposure(): number;
|
|
432
|
+
/**
|
|
433
|
+
* The camera exposure used on this material.
|
|
434
|
+
* This property is here and not in the camera to allow controlling exposure without full screen post process.
|
|
435
|
+
* This corresponds to a photographic exposure.
|
|
436
|
+
*/
|
|
437
|
+
set cameraExposure(value: number);
|
|
438
|
+
/**
|
|
439
|
+
* Gets The camera contrast used on this material.
|
|
440
|
+
*/
|
|
441
|
+
get cameraContrast(): number;
|
|
442
|
+
/**
|
|
443
|
+
* Sets The camera contrast used on this material.
|
|
444
|
+
*/
|
|
445
|
+
set cameraContrast(value: number);
|
|
446
|
+
/**
|
|
447
|
+
* Gets the Color Grading 2D Lookup Texture.
|
|
448
|
+
*/
|
|
449
|
+
get cameraColorGradingTexture(): Nullable<BaseTexture>;
|
|
450
|
+
/**
|
|
451
|
+
* Sets the Color Grading 2D Lookup Texture.
|
|
452
|
+
*/
|
|
453
|
+
set cameraColorGradingTexture(value: Nullable<BaseTexture>);
|
|
454
|
+
/**
|
|
455
|
+
* The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).
|
|
456
|
+
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
|
|
457
|
+
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
|
|
458
|
+
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
459
|
+
*/
|
|
460
|
+
get cameraColorCurves(): Nullable<ColorCurves>;
|
|
461
|
+
/**
|
|
462
|
+
* The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).
|
|
463
|
+
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
|
|
464
|
+
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
|
|
465
|
+
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
466
|
+
*/
|
|
467
|
+
set cameraColorCurves(value: Nullable<ColorCurves>);
|
|
390
468
|
/**
|
|
391
469
|
* Instantiates a new PBRMaterial instance.
|
|
392
470
|
*
|
|
@@ -113,6 +113,116 @@ export class PBRMaterial extends PBRBaseMaterial {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Gets the image processing configuration used either in this material.
|
|
118
|
+
*/
|
|
119
|
+
get imageProcessingConfiguration() {
|
|
120
|
+
return this._imageProcessingConfiguration;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Sets the Default image processing configuration used either in the this material.
|
|
124
|
+
*
|
|
125
|
+
* If sets to null, the scene one is in use.
|
|
126
|
+
*/
|
|
127
|
+
set imageProcessingConfiguration(value) {
|
|
128
|
+
this._attachImageProcessingConfiguration(value);
|
|
129
|
+
// Ensure the effect will be rebuilt.
|
|
130
|
+
this._markAllSubMeshesAsImageProcessingDirty();
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Gets whether the color curves effect is enabled.
|
|
134
|
+
*/
|
|
135
|
+
get cameraColorCurvesEnabled() {
|
|
136
|
+
return this.imageProcessingConfiguration.colorCurvesEnabled;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Sets whether the color curves effect is enabled.
|
|
140
|
+
*/
|
|
141
|
+
set cameraColorCurvesEnabled(value) {
|
|
142
|
+
this.imageProcessingConfiguration.colorCurvesEnabled = value;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Gets whether the color grading effect is enabled.
|
|
146
|
+
*/
|
|
147
|
+
get cameraColorGradingEnabled() {
|
|
148
|
+
return this.imageProcessingConfiguration.colorGradingEnabled;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Gets whether the color grading effect is enabled.
|
|
152
|
+
*/
|
|
153
|
+
set cameraColorGradingEnabled(value) {
|
|
154
|
+
this.imageProcessingConfiguration.colorGradingEnabled = value;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Gets whether tonemapping is enabled or not.
|
|
158
|
+
*/
|
|
159
|
+
get cameraToneMappingEnabled() {
|
|
160
|
+
return this._imageProcessingConfiguration.toneMappingEnabled;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Sets whether tonemapping is enabled or not
|
|
164
|
+
*/
|
|
165
|
+
set cameraToneMappingEnabled(value) {
|
|
166
|
+
this._imageProcessingConfiguration.toneMappingEnabled = value;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The camera exposure used on this material.
|
|
170
|
+
* This property is here and not in the camera to allow controlling exposure without full screen post process.
|
|
171
|
+
* This corresponds to a photographic exposure.
|
|
172
|
+
*/
|
|
173
|
+
get cameraExposure() {
|
|
174
|
+
return this._imageProcessingConfiguration.exposure;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The camera exposure used on this material.
|
|
178
|
+
* This property is here and not in the camera to allow controlling exposure without full screen post process.
|
|
179
|
+
* This corresponds to a photographic exposure.
|
|
180
|
+
*/
|
|
181
|
+
set cameraExposure(value) {
|
|
182
|
+
this._imageProcessingConfiguration.exposure = value;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Gets The camera contrast used on this material.
|
|
186
|
+
*/
|
|
187
|
+
get cameraContrast() {
|
|
188
|
+
return this._imageProcessingConfiguration.contrast;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Sets The camera contrast used on this material.
|
|
192
|
+
*/
|
|
193
|
+
set cameraContrast(value) {
|
|
194
|
+
this._imageProcessingConfiguration.contrast = value;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Gets the Color Grading 2D Lookup Texture.
|
|
198
|
+
*/
|
|
199
|
+
get cameraColorGradingTexture() {
|
|
200
|
+
return this._imageProcessingConfiguration.colorGradingTexture;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Sets the Color Grading 2D Lookup Texture.
|
|
204
|
+
*/
|
|
205
|
+
set cameraColorGradingTexture(value) {
|
|
206
|
+
this._imageProcessingConfiguration.colorGradingTexture = value;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).
|
|
210
|
+
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
|
|
211
|
+
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
|
|
212
|
+
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
213
|
+
*/
|
|
214
|
+
get cameraColorCurves() {
|
|
215
|
+
return this._imageProcessingConfiguration.colorCurves;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).
|
|
219
|
+
* They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
|
|
220
|
+
* These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;
|
|
221
|
+
* corresponding to low luminance, medium luminance, and high luminance areas respectively.
|
|
222
|
+
*/
|
|
223
|
+
set cameraColorCurves(value) {
|
|
224
|
+
this._imageProcessingConfiguration.colorCurves = value;
|
|
225
|
+
}
|
|
116
226
|
/**
|
|
117
227
|
* Instantiates a new PBRMaterial instance.
|
|
118
228
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pbrMaterial.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/PBR/pbrMaterial.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,OAAO,WAAY,SAAQ,eAAe;IA6O5C;;OAEG;IACH,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAC7C,CAAC;IACD,IAAW,iBAAiB,CAAC,KAA4B;QACrD,IAAI,CAAC,UAAU,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC1C,IAAI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAC/C,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,8BAA8B,EAAE,CAAC;YACzD,IAAI,CAAC,UAAU,CAAC,mBAAmB,GAAG,KAAK,CAAC;QAChD,CAAC;IACL,CAAC;IA0DD;;;;;;;OAOG;IACH,IAAW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AC,kCAAkC,CAAC;0DAChB;AAW9B;IADN,gBAAgB,CAAC,kCAAkC,CAAC;2DACO;AAOrD;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;uDACnB;AAS3B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;+DACX;AAQnC;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;wDACnB;AAQ3B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;yDAClB;AAO5B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,8BAA8B,CAAC;0CAC5B;AAOd;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,8BAA8B,CAAC;gEACN;AA8F/C,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators\";\r\nimport { GetEnvironmentBRDFTexture } from \"../../Misc/brdfTextureTools\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { Color3 } from \"../../Maths/math.color\";\r\nimport type { BaseTexture } from \"../../Materials/Textures/baseTexture\";\r\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial\";\r\nimport { RegisterClass } from \"../../Misc/typeStore\";\r\nimport { Material } from \"../material\";\r\nimport { SerializationHelper } from \"../../Misc/decorators.serialization\";\r\n\r\n/**\r\n * The Physically based material of BJS.\r\n *\r\n * This offers the main features of a standard PBR material.\r\n * For more information, please refer to the documentation :\r\n * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR\r\n */\r\nexport class PBRMaterial extends PBRBaseMaterial {\r\n /**\r\n * PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.\r\n */\r\n public static override readonly PBRMATERIAL_OPAQUE = PBRBaseMaterial.PBRMATERIAL_OPAQUE;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATEST = PBRBaseMaterial.PBRMATERIAL_ALPHATEST;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHABLEND = PBRBaseMaterial.PBRMATERIAL_ALPHABLEND;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n * They are also discarded below the alpha cutoff threshold to improve performances.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATESTANDBLEND = PBRBaseMaterial.PBRMATERIAL_ALPHATESTANDBLEND;\r\n\r\n /**\r\n * Defines the default value of how much AO map is occluding the analytical lights\r\n * (point spot...).\r\n */\r\n public static override DEFAULT_AO_ON_ANALYTICAL_LIGHTS = PBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Intensity of the direct lights e.g. the four lights available in your scene.\r\n * This impacts both the direct diffuse and specular highlights.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public directIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the emissive part of the material.\r\n * This helps controlling the emissive effect without modifying the emissive color.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public emissiveIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the environment e.g. how much the environment will light the object\r\n * either through harmonics for rough material or through the reflection for shiny ones.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public environmentIntensity: number = 1.0;\r\n\r\n /**\r\n * This is a special control allowing the reduction of the specular highlights coming from the\r\n * four lights of the scene. Those highlights may not be needed in full environment lighting.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public specularIntensity: number = 1.0;\r\n\r\n /**\r\n * Debug Control allowing disabling the bump map on this material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public disableBumpMap: boolean = false;\r\n\r\n /**\r\n * AKA Diffuse Texture in standard nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public albedoTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Weight texture (multiplier to the diffuse and metal lobes).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness texture (roughness of the diffuse lobe).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture Intensity in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientTextureStrength: number = 1.0;\r\n\r\n /**\r\n * Defines how much the AO map is occluding the analytical lights (point spot...).\r\n * 1 means it completely occludes it\r\n * 0 mean it has no impact\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientTextureImpactOnAnalyticalLights: number = PBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Stores the alpha values in a texture. Use luminance if texture.getAlphaFromRGB is true.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public opacityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the reflection values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the emissive values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public emissiveTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Specular texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectivityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to switch from specular/glossiness to metallic/roughness workflow.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Specifies the metallic scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the metalness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallic: Nullable<number>;\r\n\r\n /**\r\n * Specifies the roughness scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the roughness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public roughness: Nullable<number>;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 factor to help configuring the material F0.\r\n * By default the indexOfrefraction is used to compute F0;\r\n *\r\n * This is used as a factor against the default reflectance at normal incidence to tweak it.\r\n *\r\n * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;\r\n * F90 = metallicReflectanceColor;\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicF0Factor = 1;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 color.\r\n * By default the F90 is always 1;\r\n *\r\n * Please note that this factor is also used as a factor against the default reflectance at normal incidence.\r\n *\r\n * F0 = defaultF0_from_IOR * metallicF0Factor * metallicReflectanceColor\r\n * F90 = metallicF0Factor;\r\n */\r\n @serializeAsColor3()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicReflectanceColor = Color3.White();\r\n\r\n /**\r\n * Specifies that only the A channel from metallicReflectanceTexture should be used.\r\n * If false, both RGB and A channels will be used\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useOnlyMetallicFromMetallicReflectanceTexture = false;\r\n\r\n /**\r\n * Defines to store metallicReflectanceColor in RGB and metallicF0Factor in A\r\n * This is multiplied against the scalar values defined in the material.\r\n * If useOnlyMetallicFromMetallicReflectanceTexture is true, don't use the RGB channels, only A\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicReflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Defines to store reflectanceColor in RGB\r\n * This is multiplied against the scalar values defined in the material.\r\n * If both reflectanceTexture and metallicReflectanceTexture textures are provided and useOnlyMetallicFromMetallicReflectanceTexture\r\n * is false, metallicReflectanceTexture takes priority and reflectanceTexture is not used\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to enable roughness/glossiness fetch from a separate channel depending on the current mode.\r\n * Gray Scale represents roughness in metallic mode and glossiness in specular mode.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public microSurfaceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores surface normal data used to displace a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public bumpTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the pre-calculated light information of a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\r\n public lightmapTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the refracted light information in a texture.\r\n */\r\n public get refractionTexture(): Nullable<BaseTexture> {\r\n return this.subSurface.refractionTexture;\r\n }\r\n public set refractionTexture(value: Nullable<BaseTexture>) {\r\n this.subSurface.refractionTexture = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n } else if (!this.subSurface.linkRefractionWithTransparency) {\r\n this.subSurface.isRefractionEnabled = false;\r\n }\r\n }\r\n\r\n /**\r\n * The color of a material in ambient lighting.\r\n */\r\n @serializeAsColor3(\"ambient\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Diffuse Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"albedo\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public albedoColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * OpenPBR Base Weight (multiplier to the diffuse and metal lobes).\r\n */\r\n @serialize(\"baseWeight\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseWeight = 1;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness (roughness of the diffuse lobe).\r\n */\r\n @serialize(\"baseDiffuseRoughness\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseDiffuseRoughness: Nullable<number>;\r\n\r\n /**\r\n * AKA Specular Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"reflectivity\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectivityColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * The color reflected from the material.\r\n */\r\n @serializeAsColor3(\"reflection\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectionColor = new Color3(1.0, 1.0, 1.0);\r\n\r\n /**\r\n * The color emitted from the material.\r\n */\r\n @serializeAsColor3(\"emissive\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public emissiveColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Glossiness in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public microSurface = 1.0;\r\n\r\n /**\r\n * Index of refraction of the material base layer.\r\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\r\n *\r\n * This does not only impact refraction but also the Base F0 of Dielectric Materials.\r\n *\r\n * From dielectric fresnel rules: F0 = square((iorT - iorI) / (iorT + iorI))\r\n */\r\n public get indexOfRefraction(): number {\r\n return this.subSurface.indexOfRefraction;\r\n }\r\n public set indexOfRefraction(value: number) {\r\n this.subSurface.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.\r\n */\r\n public get invertRefractionY(): boolean {\r\n return this.subSurface.invertRefractionY;\r\n }\r\n public set invertRefractionY(value: boolean) {\r\n this.subSurface.invertRefractionY = value;\r\n }\r\n\r\n /**\r\n * This parameters will make the material used its opacity to control how much it is refracting against not.\r\n * Materials half opaque for instance using refraction could benefit from this control.\r\n */\r\n public get linkRefractionWithTransparency(): boolean {\r\n return this.subSurface.linkRefractionWithTransparency;\r\n }\r\n public set linkRefractionWithTransparency(value: boolean) {\r\n this.subSurface.linkRefractionWithTransparency = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n }\r\n }\r\n\r\n /**\r\n * If true, the light map contains occlusion information instead of lighting info.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useLightmapAsShadowmap = false;\r\n\r\n /**\r\n * Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public useAlphaFromAlbedoTexture = false;\r\n\r\n /**\r\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public forceAlphaTest = false;\r\n\r\n /**\r\n * Defines the alpha limits in alpha test mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public alphaCutOff = 0.4;\r\n\r\n /**\r\n * Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When sun reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useSpecularOverAlpha = true;\r\n\r\n /**\r\n * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useMicroSurfaceFromReflectivityMapAlpha = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRoughnessFromMetallicTextureAlpha = true;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its green channel.\r\n * Needs useRoughnessFromMetallicTextureAlpha to be false.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRoughnessFromMetallicTextureGreen = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the metallness information in its blue channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useMetallnessFromMetallicTextureBlue = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the ambient occlusion information in its red channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAmbientOcclusionFromMetallicTextureRed = false;\r\n\r\n /**\r\n * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAmbientInGrayScale = false;\r\n\r\n /**\r\n * In case the reflectivity map does not contain the microsurface information in its alpha channel,\r\n * The material will try to infer what glossiness each pixel should be.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAutoMicroSurfaceFromReflectivityMap = false;\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n @serialize()\r\n public get usePhysicalLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n }\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n public set usePhysicalLightFalloff(value: boolean) {\r\n if (value !== this.usePhysicalLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n @serialize()\r\n public get useGLTFLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n public set useGLTFLightFalloff(value: boolean) {\r\n if (value !== this.useGLTFLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRadianceOverAlpha = true;\r\n\r\n /**\r\n * Allows using an object space normal map (instead of tangent space).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useObjectSpaceNormalMap = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useParallax = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax occlusion mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useParallaxOcclusion = false;\r\n\r\n /**\r\n * Controls the scale bias of the parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public parallaxScaleBias = 0.05;\r\n\r\n /**\r\n * If sets to true, disables all the lights affecting the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public disableLighting = false;\r\n\r\n /**\r\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public forceIrradianceInFragment = false;\r\n\r\n /**\r\n * Number of Simultaneous lights allowed on the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public maxSimultaneousLights = 4;\r\n\r\n /**\r\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public invertNormalMapX = false;\r\n\r\n /**\r\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public invertNormalMapY = false;\r\n\r\n /**\r\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public twoSidedLighting = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAlphaFresnel = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useLinearAlphaFresnel = false;\r\n\r\n /**\r\n * Let user defines the brdf lookup texture used for IBL.\r\n * A default 8bit version is embedded but you could point at :\r\n * * Default texture: https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png\r\n * * Default 16bit pixel depth texture: https://assets.babylonjs.com/environments/correlatedMSBRDF.dds\r\n * * LEGACY Default None correlated https://assets.babylonjs.com/environments/uncorrelatedBRDF_RGBD.png\r\n * * LEGACY Default None correlated 16bit pixel depth https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds\r\n */\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public environmentBRDFTexture: Nullable<BaseTexture> = null;\r\n\r\n /**\r\n * Force normal to face away from face.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public forceNormalForward = false;\r\n\r\n /**\r\n * Enables specular anti aliasing in the PBR shader.\r\n * It will both interacts on the Geometry for analytical and IBL lighting.\r\n * It also prefilter the roughness map based on the bump values.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public enableSpecularAntiAliasing = false;\r\n\r\n /**\r\n * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal\r\n * makes the reflect vector face the model (under horizon).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useHorizonOcclusion = true;\r\n\r\n /**\r\n * This parameters will enable/disable radiance occlusion by preventing the radiance to lit\r\n * too much the area relying on ambient texture to define their ambient occlusion.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRadianceOcclusion = true;\r\n\r\n /**\r\n * If set to true, no lighting calculations will be applied.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public unlit = false;\r\n\r\n /**\r\n * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public applyDecalMapAfterDetailMap = false;\r\n\r\n /**\r\n * Instantiates a new PBRMaterial instance.\r\n *\r\n * @param name The material name\r\n * @param scene The scene the material will be use in.\r\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\r\n */\r\n constructor(name: string, scene?: Scene, forceGLSL = false) {\r\n super(name, scene, forceGLSL);\r\n\r\n this._environmentBRDFTexture = GetEnvironmentBRDFTexture(this.getScene());\r\n }\r\n\r\n /**\r\n * @returns the name of this material class.\r\n */\r\n public override getClassName(): string {\r\n return \"PBRMaterial\";\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current material.\r\n * @param name - name to use for the new material.\r\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\r\n * @param rootUrl defines the root URL to use to load textures\r\n * @returns cloned material instance\r\n */\r\n public override clone(name: string, cloneTexturesOnlyOnce: boolean = true, rootUrl = \"\"): PBRMaterial {\r\n const clone = SerializationHelper.Clone(() => new PBRMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\r\n\r\n clone.id = name;\r\n clone.name = name;\r\n\r\n this.stencil.copyTo(clone.stencil);\r\n\r\n this._clonePlugins(clone, rootUrl);\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serializes this PBR Material.\r\n * @returns - An object with the serialized material.\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.customType = \"BABYLON.PBRMaterial\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Parses a PBR Material from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene - BJS scene instance.\r\n * @param rootUrl - url for the scene object\r\n * @returns - PBRMaterial\r\n */\r\n public static override Parse(source: any, scene: Scene, rootUrl: string): PBRMaterial {\r\n const material = SerializationHelper.Parse(() => new PBRMaterial(source.name, scene), source, scene, rootUrl);\r\n\r\n if (source.stencil) {\r\n material.stencil.parse(source.stencil, scene, rootUrl);\r\n }\r\n\r\n Material._ParsePlugins(source, material, scene, rootUrl);\r\n\r\n // The code block below ensures backward compatibility with serialized materials before plugins are automatically serialized.\r\n if (source.clearCoat) {\r\n material.clearCoat.parse(source.clearCoat, scene, rootUrl);\r\n }\r\n if (source.anisotropy) {\r\n material.anisotropy.parse(source.anisotropy, scene, rootUrl);\r\n }\r\n if (source.brdf) {\r\n material.brdf.parse(source.brdf, scene, rootUrl);\r\n }\r\n if (source.sheen) {\r\n material.sheen.parse(source.sheen, scene, rootUrl);\r\n }\r\n if (source.subSurface) {\r\n material.subSurface.parse(source.subSurface, scene, rootUrl);\r\n }\r\n if (source.iridescence) {\r\n material.iridescence.parse(source.iridescence, scene, rootUrl);\r\n }\r\n\r\n return material;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.PBRMaterial\", PBRMaterial);\r\n"]}
|
|
1
|
+
{"version":3,"file":"pbrMaterial.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/PBR/pbrMaterial.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAIhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,OAAO,WAAY,SAAQ,eAAe;IA6O5C;;OAEG;IACH,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAC7C,CAAC;IACD,IAAW,iBAAiB,CAAC,KAA4B;QACrD,IAAI,CAAC,UAAU,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC1C,IAAI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,UAAU,CAAC,mBAAmB,GAAG,IAAI,CAAC;QAC/C,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,8BAA8B,EAAE,CAAC;YACzD,IAAI,CAAC,UAAU,CAAC,mBAAmB,GAAG,KAAK,CAAC;QAChD,CAAC;IACL,CAAC;IA0DD;;;;;;;OAOG;IACH,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAC7C,CAAC;IACD,IAAW,iBAAiB,CAAC,KAAa;QACtC,IAAI,CAAC,UAAU,CAAC,iBAAiB,GAAG,KA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gBAAgB,CAAC,gCAAgC,CAAC;0DAClB;AAO1B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;qDACrB;AAOzB;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;qDACrB;AAOzB;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;qDACrB;AAQzB;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;oDACtB;AAQxB;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;0DAChB;AAW9B;IADN,gBAAgB,CAAC,kCAAkC,CAAC;2DACO;AAOrD;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;uDACnB;AAS3B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;+DACX;AAQnC;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;wDACnB;AAQ3B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;yDAClB;AAO5B;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,8BAA8B,CAAC;0CAC5B;AAOd;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,8BAA8B,CAAC;gEACN;AAuN/C,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators\";\r\nimport { GetEnvironmentBRDFTexture } from \"../../Misc/brdfTextureTools\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { Color3 } from \"../../Maths/math.color\";\r\nimport type { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration\";\r\nimport type { ColorCurves } from \"../../Materials/colorCurves\";\r\nimport type { BaseTexture } from \"../../Materials/Textures/baseTexture\";\r\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial\";\r\nimport { RegisterClass } from \"../../Misc/typeStore\";\r\nimport { Material } from \"../material\";\r\nimport { SerializationHelper } from \"../../Misc/decorators.serialization\";\r\n\r\n/**\r\n * The Physically based material of BJS.\r\n *\r\n * This offers the main features of a standard PBR material.\r\n * For more information, please refer to the documentation :\r\n * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR\r\n */\r\nexport class PBRMaterial extends PBRBaseMaterial {\r\n /**\r\n * PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.\r\n */\r\n public static override readonly PBRMATERIAL_OPAQUE = PBRBaseMaterial.PBRMATERIAL_OPAQUE;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATEST = PBRBaseMaterial.PBRMATERIAL_ALPHATEST;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHABLEND = PBRBaseMaterial.PBRMATERIAL_ALPHABLEND;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n * They are also discarded below the alpha cutoff threshold to improve performances.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATESTANDBLEND = PBRBaseMaterial.PBRMATERIAL_ALPHATESTANDBLEND;\r\n\r\n /**\r\n * Defines the default value of how much AO map is occluding the analytical lights\r\n * (point spot...).\r\n */\r\n public static override DEFAULT_AO_ON_ANALYTICAL_LIGHTS = PBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Intensity of the direct lights e.g. the four lights available in your scene.\r\n * This impacts both the direct diffuse and specular highlights.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public directIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the emissive part of the material.\r\n * This helps controlling the emissive effect without modifying the emissive color.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public emissiveIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the environment e.g. how much the environment will light the object\r\n * either through harmonics for rough material or through the reflection for shiny ones.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public environmentIntensity: number = 1.0;\r\n\r\n /**\r\n * This is a special control allowing the reduction of the specular highlights coming from the\r\n * four lights of the scene. Those highlights may not be needed in full environment lighting.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public specularIntensity: number = 1.0;\r\n\r\n /**\r\n * Debug Control allowing disabling the bump map on this material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public disableBumpMap: boolean = false;\r\n\r\n /**\r\n * AKA Diffuse Texture in standard nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public albedoTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Weight texture (multiplier to the diffuse and metal lobes).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness texture (roughness of the diffuse lobe).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture Intensity in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientTextureStrength: number = 1.0;\r\n\r\n /**\r\n * Defines how much the AO map is occluding the analytical lights (point spot...).\r\n * 1 means it completely occludes it\r\n * 0 mean it has no impact\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientTextureImpactOnAnalyticalLights: number = PBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Stores the alpha values in a texture. Use luminance if texture.getAlphaFromRGB is true.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public opacityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the reflection values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the emissive values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public emissiveTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Specular texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectivityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to switch from specular/glossiness to metallic/roughness workflow.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Specifies the metallic scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the metalness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallic: Nullable<number>;\r\n\r\n /**\r\n * Specifies the roughness scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the roughness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public roughness: Nullable<number>;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 factor to help configuring the material F0.\r\n * By default the indexOfrefraction is used to compute F0;\r\n *\r\n * This is used as a factor against the default reflectance at normal incidence to tweak it.\r\n *\r\n * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;\r\n * F90 = metallicReflectanceColor;\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicF0Factor = 1;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 color.\r\n * By default the F90 is always 1;\r\n *\r\n * Please note that this factor is also used as a factor against the default reflectance at normal incidence.\r\n *\r\n * F0 = defaultF0_from_IOR * metallicF0Factor * metallicReflectanceColor\r\n * F90 = metallicF0Factor;\r\n */\r\n @serializeAsColor3()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicReflectanceColor = Color3.White();\r\n\r\n /**\r\n * Specifies that only the A channel from metallicReflectanceTexture should be used.\r\n * If false, both RGB and A channels will be used\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useOnlyMetallicFromMetallicReflectanceTexture = false;\r\n\r\n /**\r\n * Defines to store metallicReflectanceColor in RGB and metallicF0Factor in A\r\n * This is multiplied against the scalar values defined in the material.\r\n * If useOnlyMetallicFromMetallicReflectanceTexture is true, don't use the RGB channels, only A\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public metallicReflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Defines to store reflectanceColor in RGB\r\n * This is multiplied against the scalar values defined in the material.\r\n * If both reflectanceTexture and metallicReflectanceTexture textures are provided and useOnlyMetallicFromMetallicReflectanceTexture\r\n * is false, metallicReflectanceTexture takes priority and reflectanceTexture is not used\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to enable roughness/glossiness fetch from a separate channel depending on the current mode.\r\n * Gray Scale represents roughness in metallic mode and glossiness in specular mode.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public microSurfaceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores surface normal data used to displace a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public bumpTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the pre-calculated light information of a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\r\n public lightmapTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the refracted light information in a texture.\r\n */\r\n public get refractionTexture(): Nullable<BaseTexture> {\r\n return this.subSurface.refractionTexture;\r\n }\r\n public set refractionTexture(value: Nullable<BaseTexture>) {\r\n this.subSurface.refractionTexture = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n } else if (!this.subSurface.linkRefractionWithTransparency) {\r\n this.subSurface.isRefractionEnabled = false;\r\n }\r\n }\r\n\r\n /**\r\n * The color of a material in ambient lighting.\r\n */\r\n @serializeAsColor3(\"ambient\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public ambientColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Diffuse Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"albedo\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public albedoColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * OpenPBR Base Weight (multiplier to the diffuse and metal lobes).\r\n */\r\n @serialize(\"baseWeight\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseWeight = 1;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness (roughness of the diffuse lobe).\r\n */\r\n @serialize(\"baseDiffuseRoughness\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public baseDiffuseRoughness: Nullable<number>;\r\n\r\n /**\r\n * AKA Specular Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"reflectivity\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectivityColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * The color reflected from the material.\r\n */\r\n @serializeAsColor3(\"reflection\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public reflectionColor = new Color3(1.0, 1.0, 1.0);\r\n\r\n /**\r\n * The color emitted from the material.\r\n */\r\n @serializeAsColor3(\"emissive\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public emissiveColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Glossiness in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public microSurface = 1.0;\r\n\r\n /**\r\n * Index of refraction of the material base layer.\r\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\r\n *\r\n * This does not only impact refraction but also the Base F0 of Dielectric Materials.\r\n *\r\n * From dielectric fresnel rules: F0 = square((iorT - iorI) / (iorT + iorI))\r\n */\r\n public get indexOfRefraction(): number {\r\n return this.subSurface.indexOfRefraction;\r\n }\r\n public set indexOfRefraction(value: number) {\r\n this.subSurface.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.\r\n */\r\n public get invertRefractionY(): boolean {\r\n return this.subSurface.invertRefractionY;\r\n }\r\n public set invertRefractionY(value: boolean) {\r\n this.subSurface.invertRefractionY = value;\r\n }\r\n\r\n /**\r\n * This parameters will make the material used its opacity to control how much it is refracting against not.\r\n * Materials half opaque for instance using refraction could benefit from this control.\r\n */\r\n public get linkRefractionWithTransparency(): boolean {\r\n return this.subSurface.linkRefractionWithTransparency;\r\n }\r\n public set linkRefractionWithTransparency(value: boolean) {\r\n this.subSurface.linkRefractionWithTransparency = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n }\r\n }\r\n\r\n /**\r\n * If true, the light map contains occlusion information instead of lighting info.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useLightmapAsShadowmap = false;\r\n\r\n /**\r\n * Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public useAlphaFromAlbedoTexture = false;\r\n\r\n /**\r\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public forceAlphaTest = false;\r\n\r\n /**\r\n * Defines the alpha limits in alpha test mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public alphaCutOff = 0.4;\r\n\r\n /**\r\n * Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When sun reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useSpecularOverAlpha = true;\r\n\r\n /**\r\n * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useMicroSurfaceFromReflectivityMapAlpha = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRoughnessFromMetallicTextureAlpha = true;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its green channel.\r\n * Needs useRoughnessFromMetallicTextureAlpha to be false.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRoughnessFromMetallicTextureGreen = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the metallness information in its blue channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useMetallnessFromMetallicTextureBlue = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the ambient occlusion information in its red channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAmbientOcclusionFromMetallicTextureRed = false;\r\n\r\n /**\r\n * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAmbientInGrayScale = false;\r\n\r\n /**\r\n * In case the reflectivity map does not contain the microsurface information in its alpha channel,\r\n * The material will try to infer what glossiness each pixel should be.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAutoMicroSurfaceFromReflectivityMap = false;\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n @serialize()\r\n public get usePhysicalLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n }\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n public set usePhysicalLightFalloff(value: boolean) {\r\n if (value !== this.usePhysicalLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n @serialize()\r\n public get useGLTFLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n public set useGLTFLightFalloff(value: boolean) {\r\n if (value !== this.useGLTFLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRadianceOverAlpha = true;\r\n\r\n /**\r\n * Allows using an object space normal map (instead of tangent space).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useObjectSpaceNormalMap = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useParallax = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax occlusion mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useParallaxOcclusion = false;\r\n\r\n /**\r\n * Controls the scale bias of the parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public parallaxScaleBias = 0.05;\r\n\r\n /**\r\n * If sets to true, disables all the lights affecting the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public disableLighting = false;\r\n\r\n /**\r\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public forceIrradianceInFragment = false;\r\n\r\n /**\r\n * Number of Simultaneous lights allowed on the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public maxSimultaneousLights = 4;\r\n\r\n /**\r\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public invertNormalMapX = false;\r\n\r\n /**\r\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public invertNormalMapY = false;\r\n\r\n /**\r\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public twoSidedLighting = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useAlphaFresnel = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useLinearAlphaFresnel = false;\r\n\r\n /**\r\n * Let user defines the brdf lookup texture used for IBL.\r\n * A default 8bit version is embedded but you could point at :\r\n * * Default texture: https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png\r\n * * Default 16bit pixel depth texture: https://assets.babylonjs.com/environments/correlatedMSBRDF.dds\r\n * * LEGACY Default None correlated https://assets.babylonjs.com/environments/uncorrelatedBRDF_RGBD.png\r\n * * LEGACY Default None correlated 16bit pixel depth https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds\r\n */\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public environmentBRDFTexture: Nullable<BaseTexture> = null;\r\n\r\n /**\r\n * Force normal to face away from face.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public forceNormalForward = false;\r\n\r\n /**\r\n * Enables specular anti aliasing in the PBR shader.\r\n * It will both interacts on the Geometry for analytical and IBL lighting.\r\n * It also prefilter the roughness map based on the bump values.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public enableSpecularAntiAliasing = false;\r\n\r\n /**\r\n * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal\r\n * makes the reflect vector face the model (under horizon).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useHorizonOcclusion = true;\r\n\r\n /**\r\n * This parameters will enable/disable radiance occlusion by preventing the radiance to lit\r\n * too much the area relying on ambient texture to define their ambient occlusion.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public useRadianceOcclusion = true;\r\n\r\n /**\r\n * If set to true, no lighting calculations will be applied.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public unlit = false;\r\n\r\n /**\r\n * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public applyDecalMapAfterDetailMap = false;\r\n\r\n /**\r\n * Gets the image processing configuration used either in this material.\r\n */\r\n public get imageProcessingConfiguration(): ImageProcessingConfiguration {\r\n return this._imageProcessingConfiguration;\r\n }\r\n\r\n /**\r\n * Sets the Default image processing configuration used either in the this material.\r\n *\r\n * If sets to null, the scene one is in use.\r\n */\r\n public set imageProcessingConfiguration(value: ImageProcessingConfiguration) {\r\n this._attachImageProcessingConfiguration(value);\r\n\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsImageProcessingDirty();\r\n }\r\n\r\n /**\r\n * Gets whether the color curves effect is enabled.\r\n */\r\n public get cameraColorCurvesEnabled(): boolean {\r\n return this.imageProcessingConfiguration.colorCurvesEnabled;\r\n }\r\n /**\r\n * Sets whether the color curves effect is enabled.\r\n */\r\n public set cameraColorCurvesEnabled(value: boolean) {\r\n this.imageProcessingConfiguration.colorCurvesEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public get cameraColorGradingEnabled(): boolean {\r\n return this.imageProcessingConfiguration.colorGradingEnabled;\r\n }\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public set cameraColorGradingEnabled(value: boolean) {\r\n this.imageProcessingConfiguration.colorGradingEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets whether tonemapping is enabled or not.\r\n */\r\n public get cameraToneMappingEnabled(): boolean {\r\n return this._imageProcessingConfiguration.toneMappingEnabled;\r\n }\r\n /**\r\n * Sets whether tonemapping is enabled or not\r\n */\r\n public set cameraToneMappingEnabled(value: boolean) {\r\n this._imageProcessingConfiguration.toneMappingEnabled = value;\r\n }\r\n\r\n /**\r\n * The camera exposure used on this material.\r\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\r\n * This corresponds to a photographic exposure.\r\n */\r\n public get cameraExposure(): number {\r\n return this._imageProcessingConfiguration.exposure;\r\n }\r\n /**\r\n * The camera exposure used on this material.\r\n * This property is here and not in the camera to allow controlling exposure without full screen post process.\r\n * This corresponds to a photographic exposure.\r\n */\r\n public set cameraExposure(value: number) {\r\n this._imageProcessingConfiguration.exposure = value;\r\n }\r\n\r\n /**\r\n * Gets The camera contrast used on this material.\r\n */\r\n public get cameraContrast(): number {\r\n return this._imageProcessingConfiguration.contrast;\r\n }\r\n\r\n /**\r\n * Sets The camera contrast used on this material.\r\n */\r\n public set cameraContrast(value: number) {\r\n this._imageProcessingConfiguration.contrast = value;\r\n }\r\n\r\n /**\r\n * Gets the Color Grading 2D Lookup Texture.\r\n */\r\n public get cameraColorGradingTexture(): Nullable<BaseTexture> {\r\n return this._imageProcessingConfiguration.colorGradingTexture;\r\n }\r\n /**\r\n * Sets the Color Grading 2D Lookup Texture.\r\n */\r\n public set cameraColorGradingTexture(value: Nullable<BaseTexture>) {\r\n this._imageProcessingConfiguration.colorGradingTexture = value;\r\n }\r\n\r\n /**\r\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\r\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\r\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\r\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\r\n */\r\n public get cameraColorCurves(): Nullable<ColorCurves> {\r\n return this._imageProcessingConfiguration.colorCurves;\r\n }\r\n /**\r\n * The color grading curves provide additional color adjustment that is applied after any color grading transform (3D LUT).\r\n * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.\r\n * These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image;\r\n * corresponding to low luminance, medium luminance, and high luminance areas respectively.\r\n */\r\n public set cameraColorCurves(value: Nullable<ColorCurves>) {\r\n this._imageProcessingConfiguration.colorCurves = value;\r\n }\r\n\r\n /**\r\n * Instantiates a new PBRMaterial instance.\r\n *\r\n * @param name The material name\r\n * @param scene The scene the material will be use in.\r\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\r\n */\r\n constructor(name: string, scene?: Scene, forceGLSL = false) {\r\n super(name, scene, forceGLSL);\r\n\r\n this._environmentBRDFTexture = GetEnvironmentBRDFTexture(this.getScene());\r\n }\r\n\r\n /**\r\n * @returns the name of this material class.\r\n */\r\n public override getClassName(): string {\r\n return \"PBRMaterial\";\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current material.\r\n * @param name - name to use for the new material.\r\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\r\n * @param rootUrl defines the root URL to use to load textures\r\n * @returns cloned material instance\r\n */\r\n public override clone(name: string, cloneTexturesOnlyOnce: boolean = true, rootUrl = \"\"): PBRMaterial {\r\n const clone = SerializationHelper.Clone(() => new PBRMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\r\n\r\n clone.id = name;\r\n clone.name = name;\r\n\r\n this.stencil.copyTo(clone.stencil);\r\n\r\n this._clonePlugins(clone, rootUrl);\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serializes this PBR Material.\r\n * @returns - An object with the serialized material.\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.customType = \"BABYLON.PBRMaterial\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Parses a PBR Material from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene - BJS scene instance.\r\n * @param rootUrl - url for the scene object\r\n * @returns - PBRMaterial\r\n */\r\n public static override Parse(source: any, scene: Scene, rootUrl: string): PBRMaterial {\r\n const material = SerializationHelper.Parse(() => new PBRMaterial(source.name, scene), source, scene, rootUrl);\r\n\r\n if (source.stencil) {\r\n material.stencil.parse(source.stencil, scene, rootUrl);\r\n }\r\n\r\n Material._ParsePlugins(source, material, scene, rootUrl);\r\n\r\n // The code block below ensures backward compatibility with serialized materials before plugins are automatically serialized.\r\n if (source.clearCoat) {\r\n material.clearCoat.parse(source.clearCoat, scene, rootUrl);\r\n }\r\n if (source.anisotropy) {\r\n material.anisotropy.parse(source.anisotropy, scene, rootUrl);\r\n }\r\n if (source.brdf) {\r\n material.brdf.parse(source.brdf, scene, rootUrl);\r\n }\r\n if (source.sheen) {\r\n material.sheen.parse(source.sheen, scene, rootUrl);\r\n }\r\n if (source.subSurface) {\r\n material.subSurface.parse(source.subSurface, scene, rootUrl);\r\n }\r\n if (source.iridescence) {\r\n material.iridescence.parse(source.iridescence, scene, rootUrl);\r\n }\r\n\r\n return material;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.PBRMaterial\", PBRMaterial);\r\n"]}
|
|
@@ -21,30 +21,6 @@ export interface IImageProcessingConfigurationDefines {
|
|
|
21
21
|
IMAGEPROCESSINGPOSTPROCESS: boolean;
|
|
22
22
|
SKIPFINALCOLORCLAMP: boolean;
|
|
23
23
|
}
|
|
24
|
-
type ImageProcessingDefinesMixinConstructor<T = {}> = new (...args: any[]) => T;
|
|
25
|
-
/**
|
|
26
|
-
* Mixin to add Image processing defines to your material defines
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
export declare function ImageProcessingDefinesMixin<Tbase extends ImageProcessingDefinesMixinConstructor>(base: Tbase): {
|
|
30
|
-
new (...args: any[]): {
|
|
31
|
-
IMAGEPROCESSING: boolean;
|
|
32
|
-
VIGNETTE: boolean;
|
|
33
|
-
VIGNETTEBLENDMODEMULTIPLY: boolean;
|
|
34
|
-
VIGNETTEBLENDMODEOPAQUE: boolean;
|
|
35
|
-
TONEMAPPING: number;
|
|
36
|
-
CONTRAST: boolean;
|
|
37
|
-
COLORCURVES: boolean;
|
|
38
|
-
COLORGRADING: boolean;
|
|
39
|
-
COLORGRADING3D: boolean;
|
|
40
|
-
SAMPLER3DGREENDEPTH: boolean;
|
|
41
|
-
SAMPLER3DBGRMAP: boolean;
|
|
42
|
-
DITHER: boolean;
|
|
43
|
-
IMAGEPROCESSINGPOSTPROCESS: boolean;
|
|
44
|
-
SKIPFINALCOLORCLAMP: boolean;
|
|
45
|
-
EXPOSURE: boolean;
|
|
46
|
-
};
|
|
47
|
-
} & Tbase;
|
|
48
24
|
/**
|
|
49
25
|
* @internal
|
|
50
26
|
*/
|
|
@@ -66,4 +42,3 @@ export declare class ImageProcessingConfigurationDefines extends MaterialDefines
|
|
|
66
42
|
SKIPFINALCOLORCLAMP: boolean;
|
|
67
43
|
constructor();
|
|
68
44
|
}
|
|
69
|
-
export {};
|
|
@@ -1,31 +1,4 @@
|
|
|
1
1
|
import { MaterialDefines } from "./materialDefines.js";
|
|
2
|
-
/**
|
|
3
|
-
* Mixin to add Image processing defines to your material defines
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export function ImageProcessingDefinesMixin(base) {
|
|
7
|
-
return class extends base {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
// Implement all members of IImageProcessingConfigurationDefines here
|
|
11
|
-
this.IMAGEPROCESSING = false;
|
|
12
|
-
this.VIGNETTE = false;
|
|
13
|
-
this.VIGNETTEBLENDMODEMULTIPLY = false;
|
|
14
|
-
this.VIGNETTEBLENDMODEOPAQUE = false;
|
|
15
|
-
this.TONEMAPPING = 0;
|
|
16
|
-
this.CONTRAST = false;
|
|
17
|
-
this.COLORCURVES = false;
|
|
18
|
-
this.COLORGRADING = false;
|
|
19
|
-
this.COLORGRADING3D = false;
|
|
20
|
-
this.SAMPLER3DGREENDEPTH = false;
|
|
21
|
-
this.SAMPLER3DBGRMAP = false;
|
|
22
|
-
this.DITHER = false;
|
|
23
|
-
this.IMAGEPROCESSINGPOSTPROCESS = false;
|
|
24
|
-
this.SKIPFINALCOLORCLAMP = false;
|
|
25
|
-
this.EXPOSURE = false;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
2
|
/**
|
|
30
3
|
* @internal
|
|
31
4
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageProcessingConfiguration.defines.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessingConfiguration.defines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"imageProcessingConfiguration.defines.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessingConfiguration.defines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAwBpD;;GAEG;AACH,MAAM,OAAO,mCAAoC,SAAQ,eAAe;IAiBpE;QACI,KAAK,EAAE,CAAC;QAjBL,oBAAe,GAAG,KAAK,CAAC;QACxB,aAAQ,GAAG,KAAK,CAAC;QACjB,8BAAyB,GAAG,KAAK,CAAC;QAClC,4BAAuB,GAAG,KAAK,CAAC;QAChC,gBAAW,GAAG,CAAC,CAAC;QAChB,aAAQ,GAAG,KAAK,CAAC;QACjB,gBAAW,GAAG,KAAK,CAAC;QACpB,iBAAY,GAAG,KAAK,CAAC;QACrB,mBAAc,GAAG,KAAK,CAAC;QACvB,wBAAmB,GAAG,KAAK,CAAC;QAC5B,oBAAe,GAAG,KAAK,CAAC;QACxB,WAAM,GAAG,KAAK,CAAC;QACf,+BAA0B,GAAG,KAAK,CAAC;QACnC,aAAQ,GAAG,KAAK,CAAC;QACjB,wBAAmB,GAAG,KAAK,CAAC;QAI/B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;CACJ","sourcesContent":["import { MaterialDefines } from \"./materialDefines\";\r\n/**\r\n * Interface to follow in your material defines to integrate easily the\r\n * Image processing functions.\r\n * @internal\r\n */\r\nexport interface IImageProcessingConfigurationDefines {\r\n IMAGEPROCESSING: boolean;\r\n VIGNETTE: boolean;\r\n VIGNETTEBLENDMODEMULTIPLY: boolean;\r\n VIGNETTEBLENDMODEOPAQUE: boolean;\r\n TONEMAPPING: number;\r\n CONTRAST: boolean;\r\n EXPOSURE: boolean;\r\n COLORCURVES: boolean;\r\n COLORGRADING: boolean;\r\n COLORGRADING3D: boolean;\r\n SAMPLER3DGREENDEPTH: boolean;\r\n SAMPLER3DBGRMAP: boolean;\r\n DITHER: boolean;\r\n IMAGEPROCESSINGPOSTPROCESS: boolean;\r\n SKIPFINALCOLORCLAMP: boolean;\r\n}\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class ImageProcessingConfigurationDefines extends MaterialDefines implements IImageProcessingConfigurationDefines {\r\n public IMAGEPROCESSING = false;\r\n public VIGNETTE = false;\r\n public VIGNETTEBLENDMODEMULTIPLY = false;\r\n public VIGNETTEBLENDMODEOPAQUE = false;\r\n public TONEMAPPING = 0;\r\n public CONTRAST = false;\r\n public COLORCURVES = false;\r\n public COLORGRADING = false;\r\n public COLORGRADING3D = false;\r\n public SAMPLER3DGREENDEPTH = false;\r\n public SAMPLER3DBGRMAP = false;\r\n public DITHER = false;\r\n public IMAGEPROCESSINGPOSTPROCESS = false;\r\n public EXPOSURE = false;\r\n public SKIPFINALCOLORCLAMP = false;\r\n\r\n constructor() {\r\n super();\r\n this.rebuild();\r\n }\r\n}\r\n"]}
|
package/Materials/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export * from "./iEffectFallbacks.js";
|
|
|
4
4
|
export * from "./effectFallbacks.js";
|
|
5
5
|
export * from "./effect.js";
|
|
6
6
|
export * from "./fresnelParameters.js";
|
|
7
|
-
export * from "./imageProcessing.js";
|
|
8
7
|
export * from "./imageProcessingConfiguration.js";
|
|
9
8
|
export * from "./material.js";
|
|
10
9
|
export * from "./materialDefines.js";
|
|
@@ -40,7 +39,6 @@ export * from "./GaussianSplatting/gaussianSplattingMaterial.js";
|
|
|
40
39
|
export * from "./materialHelper.functions.js";
|
|
41
40
|
export * from "./materialHelper.geometryrendering.js";
|
|
42
41
|
export * from "./materialStencilState.js";
|
|
43
|
-
export * from "./uv.defines.js";
|
|
44
42
|
import "./material.decalMap.js";
|
|
45
43
|
export * from "../Shaders/default.fragment.js";
|
|
46
44
|
export * from "../Shaders/default.vertex.js";
|
package/Materials/index.js
CHANGED
|
@@ -5,7 +5,6 @@ export * from "./iEffectFallbacks.js";
|
|
|
5
5
|
export * from "./effectFallbacks.js";
|
|
6
6
|
export * from "./effect.js";
|
|
7
7
|
export * from "./fresnelParameters.js";
|
|
8
|
-
export * from "./imageProcessing.js";
|
|
9
8
|
export * from "./imageProcessingConfiguration.js";
|
|
10
9
|
export * from "./material.js";
|
|
11
10
|
export * from "./materialDefines.js";
|
|
@@ -41,7 +40,6 @@ export * from "./GaussianSplatting/gaussianSplattingMaterial.js";
|
|
|
41
40
|
export * from "./materialHelper.functions.js";
|
|
42
41
|
export * from "./materialHelper.geometryrendering.js";
|
|
43
42
|
export * from "./materialStencilState.js";
|
|
44
|
-
export * from "./uv.defines.js";
|
|
45
43
|
import "./material.decalMap.js";
|
|
46
44
|
// async-loaded shaders
|
|
47
45
|
// StandardMaterial
|
package/Materials/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,OAAO,qBAAqB,CAAC;AAE7B,uBAAuB;AAEvB,mBAAmB;AACnB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,2BAA2B;AAC3B,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./Background/index\";\r\nexport * from \"./colorCurves\";\r\nexport * from \"./iEffectFallbacks\";\r\nexport * from \"./effectFallbacks\";\r\nexport * from \"./effect\";\r\nexport * from \"./fresnelParameters\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./material\";\r\nexport * from \"./materialDefines\";\r\nexport * from \"./clipPlaneMaterialHelper\";\r\nexport * from \"./materialHelper\";\r\nexport * from \"./multiMaterial\";\r\nexport * from \"./Occlusion/index\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./pushMaterial\";\r\nexport * from \"./shaderLanguage\";\r\nexport * from \"./shaderMaterial\";\r\nexport * from \"./standardMaterial\";\r\nexport * from \"./Textures/index\";\r\nexport * from \"./uniformBuffer\";\r\nexport * from \"./materialFlags\";\r\nexport * from \"./Node/index\";\r\nexport * from \"./effectRenderer\";\r\nexport * from \"./shadowDepthWrapper\";\r\nexport * from \"./drawWrapper.functions\";\r\nexport * from \"./drawWrapper\";\r\nexport * from \"./materialPluginBase\";\r\nexport * from \"./materialPluginManager\";\r\nexport * from \"./materialPluginEvent\";\r\nexport * from \"./material.detailMapConfiguration\";\r\nexport * from \"./material.decalMapConfiguration\";\r\nexport * from \"./materialPluginFactoryExport\";\r\nexport * from \"./GreasedLine/greasedLinePluginMaterial\";\r\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\r\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\r\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\r\nexport * from \"./meshDebugPluginMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial\";\r\nexport * from \"./materialHelper.functions\";\r\nexport * from \"./materialHelper.geometryrendering\";\r\nexport * from \"./materialStencilState\";\r\nimport \"./material.decalMap\";\r\n\r\n// async-loaded shaders\r\n\r\n// StandardMaterial\r\nexport * from \"../Shaders/default.fragment\";\r\nexport * from \"../Shaders/default.vertex\";\r\nexport * from \"../ShadersWGSL/default.fragment\";\r\nexport * from \"../ShadersWGSL/default.vertex\";\r\n\r\n// GreasedLineSimplMaterial\r\nexport * from \"../Shaders/greasedLine.fragment\";\r\nexport * from \"../Shaders/greasedLine.vertex\";\r\nexport * from \"../ShadersWGSL/greasedLine.fragment\";\r\nexport * from \"../ShadersWGSL/greasedLine.vertex\";\r\n"]}
|
package/Materials/material.d.ts
CHANGED
|
@@ -154,20 +154,6 @@ export declare class Material implements IAnimatable, IClipPlanesHolder {
|
|
|
154
154
|
* Details of the algorithm can be found here: https://blog.selfshadow.com/publications/blending-in-detail/
|
|
155
155
|
*/
|
|
156
156
|
static readonly MATERIAL_NORMALBLENDMETHOD_RNM = 1;
|
|
157
|
-
/**
|
|
158
|
-
* PBRMaterialLightFalloff Physical: light is falling off following the inverse squared distance law.
|
|
159
|
-
*/
|
|
160
|
-
static readonly LIGHTFALLOFF_PHYSICAL = 0;
|
|
161
|
-
/**
|
|
162
|
-
* PBRMaterialLightFalloff gltf: light is falling off as described in the gltf moving to PBR document
|
|
163
|
-
* to enhance interoperability with other engines.
|
|
164
|
-
*/
|
|
165
|
-
static readonly LIGHTFALLOFF_GLTF = 1;
|
|
166
|
-
/**
|
|
167
|
-
* PBRMaterialLightFalloff Standard: light is falling off like in the standard material
|
|
168
|
-
* to enhance interoperability with other materials.
|
|
169
|
-
*/
|
|
170
|
-
static readonly LIGHTFALLOFF_STANDARD = 2;
|
|
171
157
|
/**
|
|
172
158
|
* Event observable which raises global events common to all materials (like MaterialPluginEvent.Created)
|
|
173
159
|
*/
|
package/Materials/material.js
CHANGED
|
@@ -1595,20 +1595,6 @@ Material.MATERIAL_NORMALBLENDMETHOD_WHITEOUT = 0;
|
|
|
1595
1595
|
* Details of the algorithm can be found here: https://blog.selfshadow.com/publications/blending-in-detail/
|
|
1596
1596
|
*/
|
|
1597
1597
|
Material.MATERIAL_NORMALBLENDMETHOD_RNM = 1;
|
|
1598
|
-
/**
|
|
1599
|
-
* PBRMaterialLightFalloff Physical: light is falling off following the inverse squared distance law.
|
|
1600
|
-
*/
|
|
1601
|
-
Material.LIGHTFALLOFF_PHYSICAL = 0;
|
|
1602
|
-
/**
|
|
1603
|
-
* PBRMaterialLightFalloff gltf: light is falling off as described in the gltf moving to PBR document
|
|
1604
|
-
* to enhance interoperability with other engines.
|
|
1605
|
-
*/
|
|
1606
|
-
Material.LIGHTFALLOFF_GLTF = 1;
|
|
1607
|
-
/**
|
|
1608
|
-
* PBRMaterialLightFalloff Standard: light is falling off like in the standard material
|
|
1609
|
-
* to enhance interoperability with other materials.
|
|
1610
|
-
*/
|
|
1611
|
-
Material.LIGHTFALLOFF_STANDARD = 2;
|
|
1612
1598
|
/**
|
|
1613
1599
|
* Event observable which raises global events common to all materials (like MaterialPluginEvent.Created)
|
|
1614
1600
|
*/
|