@onerjs/core 8.36.5 → 8.36.7
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/thinEngine.d.ts +3 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Layers/highlightLayer.d.ts +5 -0
- package/Layers/highlightLayer.js +12 -0
- package/Layers/highlightLayer.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.d.ts +135 -16
- package/Materials/PBR/openpbrMaterial.js +206 -169
- package/Materials/PBR/openpbrMaterial.js.map +1 -1
- package/Materials/materialHelper.functions.js +1 -0
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Misc/sceneRecorder.d.ts +6 -2
- package/Misc/sceneRecorder.js +7 -0
- package/Misc/sceneRecorder.js.map +1 -1
- package/Misc/screenshotTools.js +1 -1
- package/Misc/screenshotTools.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +8 -10
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +7 -9
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js +4 -0
- package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrAmbientOcclusionData.d.ts +5 -0
- package/Shaders/ShadersInclude/openpbrAmbientOcclusionData.js +15 -0
- package/Shaders/ShadersInclude/openpbrAmbientOcclusionData.js.map +1 -0
- package/Shaders/ShadersInclude/openpbrAmbientOcclusionFunctions.d.ts +5 -0
- package/Shaders/ShadersInclude/openpbrAmbientOcclusionFunctions.js +13 -0
- package/Shaders/ShadersInclude/openpbrAmbientOcclusionFunctions.js.map +1 -0
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.d.ts +5 -0
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +26 -0
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -0
- package/Shaders/ShadersInclude/openpbrBaseLayerData.js +18 -7
- package/Shaders/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js +52 -6
- package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +109 -6
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.d.ts +1 -0
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js +24 -4
- package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.js +10 -1
- package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrIblFunctions.js +9 -2
- package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrThinFilmLayerData.js +1 -0
- package/Shaders/ShadersInclude/openpbrThinFilmLayerData.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrTransmissionLayerData.d.ts +5 -0
- package/Shaders/ShadersInclude/openpbrTransmissionLayerData.js +47 -0
- package/Shaders/ShadersInclude/openpbrTransmissionLayerData.js.map +1 -0
- package/Shaders/ShadersInclude/openpbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/openpbrUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.d.ts +1 -0
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +17 -4
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrHelperFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrHelperFunctions.js.map +1 -1
- package/Shaders/openpbr.fragment.d.ts +4 -1
- package/Shaders/openpbr.fragment.js +33 -15
- package/Shaders/openpbr.fragment.js.map +1 -1
- package/Shaders/openpbr.vertex.js +30 -18
- package/Shaders/openpbr.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +10 -12
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +4 -0
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/importanceSampling.js +1 -1
- package/ShadersWGSL/ShadersInclude/importanceSampling.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionData.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionData.js +15 -0
- package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionData.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionFunctions.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionFunctions.js +13 -0
- package/ShadersWGSL/ShadersInclude/openpbrAmbientOcclusionFunctions.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +25 -0
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js +18 -7
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +52 -6
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +115 -7
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.js +10 -1
- package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrFuzzLayerData.js +4 -4
- package/ShadersWGSL/ShadersInclude/openpbrFuzzLayerData.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +10 -3
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.js +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrThinFilmLayerData.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrTransmissionLayerData.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/openpbrTransmissionLayerData.js +47 -0
- package/ShadersWGSL/ShadersInclude/openpbrTransmissionLayerData.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js.map +1 -1
- package/ShadersWGSL/openpbr.fragment.d.ts +4 -1
- package/ShadersWGSL/openpbr.fragment.js +33 -15
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/openpbr.vertex.js +12 -0
- package/ShadersWGSL/openpbr.vertex.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "../../tslib.es6.js";
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
-
import { serialize, expandToProperty, addAccessorsForMaterialProperty
|
|
3
|
+
import { serialize, expandToProperty, addAccessorsForMaterialProperty } from "../../Misc/decorators.js";
|
|
4
4
|
import { GetEnvironmentBRDFTexture, GetEnvironmentFuzzBRDFTexture } from "../../Misc/brdfTextureTools.js";
|
|
5
|
-
import { Scene } from "../../scene.js";
|
|
6
5
|
import { Color3 } from "../../Maths/math.color.js";
|
|
7
6
|
import { ImageProcessingConfiguration } from "../imageProcessingConfiguration.js";
|
|
8
7
|
import { Texture } from "../Textures/texture.js";
|
|
@@ -169,10 +168,8 @@ export class OpenPBRMaterialDefines extends ImageProcessingDefinesMixin(OpenPBRM
|
|
|
169
168
|
this.REFLECTIVITYDIRECTUV = 0;
|
|
170
169
|
this.SPECULARTERM = false;
|
|
171
170
|
this.LODBASEDMICROSFURACE = true;
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
174
|
-
this.ROUGHNESSSTOREINMETALMAPGREEN = false;
|
|
175
|
-
this.METALLNESSSTOREINMETALMAPBLUE = false;
|
|
171
|
+
this.SPECULAR_ROUGHNESS_FROM_METALNESS_TEXTURE_GREEN = false;
|
|
172
|
+
this.BASE_METALNESS_FROM_METALNESS_TEXTURE_BLUE = false;
|
|
176
173
|
this.AOSTOREINMETALMAPRED = false;
|
|
177
174
|
this.SPECULAR_WEIGHT_IN_ALPHA = false;
|
|
178
175
|
this.SPECULAR_WEIGHT_FROM_SPECULAR_COLOR_TEXTURE = false;
|
|
@@ -182,6 +179,7 @@ export class OpenPBRMaterialDefines extends ImageProcessingDefinesMixin(OpenPBRM
|
|
|
182
179
|
this.USE_GLTF_STYLE_ANISOTROPY = false;
|
|
183
180
|
this.THIN_FILM_THICKNESS_FROM_THIN_FILM_TEXTURE = false;
|
|
184
181
|
this.FUZZ_ROUGHNESS_FROM_TEXTURE_ALPHA = false;
|
|
182
|
+
this.GEOMETRY_THICKNESS_FROM_GREEN_CHANNEL = false;
|
|
185
183
|
this.ENVIRONMENTBRDF = false;
|
|
186
184
|
this.ENVIRONMENTBRDF_RGBD = false;
|
|
187
185
|
this.FUZZENVIRONMENTBRDF = false;
|
|
@@ -225,6 +223,28 @@ export class OpenPBRMaterialDefines extends ImageProcessingDefinesMixin(OpenPBRM
|
|
|
225
223
|
* Iridescence is the name of thin film interference in the PBR material.
|
|
226
224
|
*/
|
|
227
225
|
this.IRIDESCENCE = false;
|
|
226
|
+
/**
|
|
227
|
+
* Tells the shader to enable dispersion in refraction
|
|
228
|
+
*/
|
|
229
|
+
this.DISPERSION = false;
|
|
230
|
+
/**
|
|
231
|
+
* Enables subsurface scattering
|
|
232
|
+
*/
|
|
233
|
+
this.SCATTERING = false;
|
|
234
|
+
/**
|
|
235
|
+
* Refraction of the 2D background texture. Might include the rest of the scene or just the background.
|
|
236
|
+
*/
|
|
237
|
+
this.REFRACTED_BACKGROUND = false;
|
|
238
|
+
/**
|
|
239
|
+
* Refraction of direct lights.
|
|
240
|
+
*/
|
|
241
|
+
this.REFRACTED_LIGHTS = false;
|
|
242
|
+
/**
|
|
243
|
+
* Refraction of the environment texture (IBL).
|
|
244
|
+
*/
|
|
245
|
+
this.REFRACTED_ENVIRONMENT = false;
|
|
246
|
+
this.REFRACTED_ENVIRONMENT_OPPOSITEZ = false;
|
|
247
|
+
this.REFRACTED_ENVIRONMENT_LOCAL_CUBE = false;
|
|
228
248
|
this.REFLECTION = false;
|
|
229
249
|
this.REFLECTIONMAP_3D = false;
|
|
230
250
|
this.REFLECTIONMAP_SPHERICAL = false;
|
|
@@ -426,35 +446,32 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
426
446
|
}
|
|
427
447
|
}
|
|
428
448
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
449
|
+
/**
|
|
450
|
+
* Set the texture used for refraction of the background of transparent materials
|
|
451
|
+
* @internal
|
|
452
|
+
*/
|
|
453
|
+
get backgroundRefractionTexture() {
|
|
454
|
+
return this._backgroundRefractionTexture;
|
|
432
455
|
}
|
|
433
|
-
set
|
|
434
|
-
this.
|
|
435
|
-
this.
|
|
456
|
+
set backgroundRefractionTexture(texture) {
|
|
457
|
+
this._backgroundRefractionTexture = texture;
|
|
458
|
+
this._markAllSubMeshesAsTexturesDirty();
|
|
436
459
|
}
|
|
437
460
|
/**
|
|
438
461
|
* Enables realtime filtering on the texture.
|
|
439
462
|
*/
|
|
440
463
|
get realTimeFiltering() {
|
|
441
|
-
return
|
|
464
|
+
return this._realTimeFiltering;
|
|
442
465
|
}
|
|
443
466
|
set realTimeFiltering(b) {
|
|
444
467
|
this._realTimeFiltering = b;
|
|
445
468
|
this.markAsDirty(1);
|
|
446
469
|
}
|
|
447
|
-
/**
|
|
448
|
-
* Checks if the real-time filtering setting is explicitly set by the user.
|
|
449
|
-
*/
|
|
450
|
-
get isUserSetRealTimeFiltering() {
|
|
451
|
-
return typeof this._realTimeFiltering === "boolean";
|
|
452
|
-
}
|
|
453
470
|
/**
|
|
454
471
|
* Quality switch for realtime filtering
|
|
455
472
|
*/
|
|
456
473
|
get realTimeFilteringQuality() {
|
|
457
|
-
return this._realTimeFilteringQuality
|
|
474
|
+
return this._realTimeFilteringQuality;
|
|
458
475
|
}
|
|
459
476
|
set realTimeFilteringQuality(n) {
|
|
460
477
|
this._realTimeFilteringQuality = n;
|
|
@@ -470,12 +487,6 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
470
487
|
this._fuzzSampleNumber = n;
|
|
471
488
|
this.markAsDirty(1);
|
|
472
489
|
}
|
|
473
|
-
/**
|
|
474
|
-
* Checks if the real-time filtering quality has been set by the user.
|
|
475
|
-
*/
|
|
476
|
-
get isUserSetRealTimeFilteringQuality() {
|
|
477
|
-
return typeof this._realTimeFilteringQuality === "number";
|
|
478
|
-
}
|
|
479
490
|
/**
|
|
480
491
|
* Can this material render to several textures at once
|
|
481
492
|
*/
|
|
@@ -508,6 +519,18 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
508
519
|
this._specularRoughnessAnisotropy = new Property("specular_roughness_anisotropy", 0, "vSpecularAnisotropy", 3, 2);
|
|
509
520
|
this._specularRoughnessAnisotropyTexture = new Sampler("specular_roughness_anisotropy", "specularRoughnessAnisotropy", "SPECULAR_ROUGHNESS_ANISOTROPY");
|
|
510
521
|
this._specularIor = new Property("specular_ior", 1.5, "vReflectanceInfo", 4, 2);
|
|
522
|
+
this._transmissionWeight = new Property("transmission_weight", 0.0, "vTransmissionWeight", 1);
|
|
523
|
+
this._transmissionWeightTexture = new Sampler("transmission_weight", "transmissionWeight", "TRANSMISSION_WEIGHT");
|
|
524
|
+
this._transmissionColor = new Property("transmission_color", Color3.White(), "vTransmissionColor", 3, 0);
|
|
525
|
+
this._transmissionColorTexture = new Sampler("transmission_color", "transmissionColor", "TRANSMISSION_COLOR");
|
|
526
|
+
this._transmissionDepth = new Property("transmission_depth", 0.0, "vTransmissionDepth", 1, 0);
|
|
527
|
+
this._transmissionDepthTexture = new Sampler("transmission_depth", "transmissionDepth", "TRANSMISSION_DEPTH");
|
|
528
|
+
this._transmissionScatter = new Property("transmission_scatter", Color3.Black(), "vTransmissionScatter", 3, 0);
|
|
529
|
+
this._transmissionScatterTexture = new Sampler("transmission_scatter", "transmissionScatter", "TRANSMISSION_SCATTER");
|
|
530
|
+
this._transmissionScatterAnisotropy = new Property("transmission_scatter_anisotropy", 0.0, "vTransmissionScatterAnisotropy", 1, 0);
|
|
531
|
+
this._transmissionDispersionScale = new Property("transmission_dispersion_scale", 0.0, "vTransmissionDispersionScale", 1, 0);
|
|
532
|
+
this._transmissionDispersionScaleTexture = new Sampler("transmission_dispersion_scale", "transmissionDispersionScale", "TRANSMISSION_DISPERSION_SCALE");
|
|
533
|
+
this._transmissionDispersionAbbeNumber = new Property("transmission_dispersion_abbe_number", 20.0, "vTransmissionDispersionAbbeNumber", 1, 0);
|
|
511
534
|
this._coatWeight = new Property("coat_weight", 0.0, "vCoatWeight", 1, 0);
|
|
512
535
|
this._coatWeightTexture = new Sampler("coat_weight", "coatWeight", "COAT_WEIGHT");
|
|
513
536
|
this._coatColor = new Property("coat_color", Color3.White(), "vCoatColor", 3, 0);
|
|
@@ -538,6 +561,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
538
561
|
this._geometryCoatTangentTexture = new Sampler("geometry_coat_tangent", "geometryCoatTangent", "GEOMETRY_COAT_TANGENT");
|
|
539
562
|
this._geometryOpacity = new Property("geometry_opacity", 1.0, "vBaseColor", 4, 3);
|
|
540
563
|
this._geometryOpacityTexture = new Sampler("geometry_opacity", "geometryOpacity", "GEOMETRY_OPACITY");
|
|
564
|
+
this._geometryThickness = new Property("geometry_thickness", 0.0, "vGeometryThickness", 1, 0);
|
|
565
|
+
this._geometryThicknessTexture = new Sampler("geometry_thickness", "geometryThickness", "GEOMETRY_THICKNESS");
|
|
541
566
|
this._emissionLuminance = new Property("emission_luminance", 1.0, "vLightingIntensity", 4, 1);
|
|
542
567
|
this._emissionColor = new Property("emission_color", Color3.Black(), "vEmissionColor", 3);
|
|
543
568
|
this._emissionColorTexture = new Sampler("emission_color", "emissionColor", "EMISSION_COLOR");
|
|
@@ -757,8 +782,16 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
757
782
|
this._useMetallicFromMetallicTextureBlue = false;
|
|
758
783
|
/**
|
|
759
784
|
* Specifies if the thin film thickness is stored in the green channel of the thin film thickness texture.
|
|
785
|
+
* This is for compatibility with glTF.
|
|
786
|
+
* @internal
|
|
760
787
|
*/
|
|
761
788
|
this._useThinFilmThicknessFromTextureGreen = false;
|
|
789
|
+
/**
|
|
790
|
+
* Specifies if the geometry thickness is stored in the green channel of the geometry thickness texture.
|
|
791
|
+
* This is for compatibility with glTF.
|
|
792
|
+
* @internal
|
|
793
|
+
*/
|
|
794
|
+
this._useGeometryThicknessFromGreenChannel = false;
|
|
762
795
|
/**
|
|
763
796
|
* Defines the falloff type used in this material.
|
|
764
797
|
* It by default is Physical.
|
|
@@ -841,14 +874,14 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
841
874
|
* @internal
|
|
842
875
|
*/
|
|
843
876
|
this._environmentFuzzBRDFTexture = null;
|
|
877
|
+
this._backgroundRefractionTexture = null;
|
|
844
878
|
/**
|
|
845
879
|
* Force the shader to compute irradiance in the fragment shader in order to take normal mapping into account.
|
|
846
880
|
* @internal
|
|
847
881
|
*/
|
|
848
882
|
this._forceIrradianceInFragment = false;
|
|
849
|
-
this.
|
|
850
|
-
this.
|
|
851
|
-
this._realTimeFilteringQuality = undefined;
|
|
883
|
+
this._realTimeFiltering = false;
|
|
884
|
+
this._realTimeFilteringQuality = 8;
|
|
852
885
|
this._fuzzSampleNumber = 4;
|
|
853
886
|
/**
|
|
854
887
|
* Force normal to face away from face.
|
|
@@ -920,6 +953,9 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
920
953
|
if (MaterialFlags.ReflectionTextureEnabled && this._radianceTexture && this._radianceTexture.isRenderTarget) {
|
|
921
954
|
this._renderTargets.push(this._radianceTexture);
|
|
922
955
|
}
|
|
956
|
+
if (MaterialFlags.RefractionTextureEnabled && this._backgroundRefractionTexture && this._backgroundRefractionTexture.isRenderTarget) {
|
|
957
|
+
this._renderTargets.push(this._backgroundRefractionTexture);
|
|
958
|
+
}
|
|
923
959
|
this._eventInfo.renderTargets = this._renderTargets;
|
|
924
960
|
this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);
|
|
925
961
|
return this._renderTargets;
|
|
@@ -984,6 +1020,18 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
984
1020
|
this._specularRoughnessTexture;
|
|
985
1021
|
this._specularRoughnessAnisotropy;
|
|
986
1022
|
this._specularRoughnessAnisotropyTexture;
|
|
1023
|
+
this._transmissionWeight;
|
|
1024
|
+
this._transmissionWeightTexture;
|
|
1025
|
+
this._transmissionColor;
|
|
1026
|
+
this._transmissionColorTexture;
|
|
1027
|
+
this._transmissionDepth;
|
|
1028
|
+
this._transmissionDepthTexture;
|
|
1029
|
+
this._transmissionScatter;
|
|
1030
|
+
this._transmissionScatterTexture;
|
|
1031
|
+
this._transmissionScatterAnisotropy;
|
|
1032
|
+
this._transmissionDispersionScale;
|
|
1033
|
+
this._transmissionDispersionScaleTexture;
|
|
1034
|
+
this._transmissionDispersionAbbeNumber;
|
|
987
1035
|
this._coatWeight;
|
|
988
1036
|
this._coatWeightTexture;
|
|
989
1037
|
this._coatColor;
|
|
@@ -1009,6 +1057,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1009
1057
|
this._geometryCoatTangentTexture;
|
|
1010
1058
|
this._geometryOpacity;
|
|
1011
1059
|
this._geometryOpacityTexture;
|
|
1060
|
+
this._geometryThickness;
|
|
1061
|
+
this._geometryThicknessTexture;
|
|
1012
1062
|
this._thinFilmWeight;
|
|
1013
1063
|
this._thinFilmWeightTexture;
|
|
1014
1064
|
this._thinFilmThickness;
|
|
@@ -1027,6 +1077,9 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1027
1077
|
if (MaterialFlags.ReflectionTextureEnabled && this._radianceTexture && this._radianceTexture.isRenderTarget) {
|
|
1028
1078
|
return true;
|
|
1029
1079
|
}
|
|
1080
|
+
if (MaterialFlags.RefractionTextureEnabled && this._backgroundRefractionTexture && this._backgroundRefractionTexture.isRenderTarget) {
|
|
1081
|
+
return true;
|
|
1082
|
+
}
|
|
1030
1083
|
return this._cacheHasRenderTargetTextures;
|
|
1031
1084
|
}
|
|
1032
1085
|
/**
|
|
@@ -1221,6 +1274,11 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1221
1274
|
return false;
|
|
1222
1275
|
}
|
|
1223
1276
|
}
|
|
1277
|
+
if (this._backgroundRefractionTexture && MaterialFlags.RefractionTextureEnabled) {
|
|
1278
|
+
if (!this._backgroundRefractionTexture.isReadyOrNotBlocking()) {
|
|
1279
|
+
return false;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1224
1282
|
if (OpenPBRMaterial._noiseTextures[scene.uniqueId]) {
|
|
1225
1283
|
if (!OpenPBRMaterial._noiseTextures[scene.uniqueId].isReady()) {
|
|
1226
1284
|
return false;
|
|
@@ -1298,6 +1356,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1298
1356
|
ubo.addUniform("pointSize", 1);
|
|
1299
1357
|
ubo.addUniform("vDebugMode", 2);
|
|
1300
1358
|
ubo.addUniform("cameraInfo", 4);
|
|
1359
|
+
ubo.addUniform("backgroundRefractionMatrix", 16);
|
|
1360
|
+
ubo.addUniform("vBackgroundRefractionInfos", 3);
|
|
1301
1361
|
PrepareUniformLayoutForIBL(ubo, true, true, true, true, true);
|
|
1302
1362
|
Object.values(this._uniformsList).forEach((uniform) => {
|
|
1303
1363
|
ubo.addUniform(uniform.name, uniform.numComponents);
|
|
@@ -1308,6 +1368,24 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1308
1368
|
});
|
|
1309
1369
|
super.buildUniformLayout();
|
|
1310
1370
|
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Binds the material data (this function is called even if mustRebind() returns false)
|
|
1373
|
+
* @param uniformBuffer defines the Uniform buffer to fill in.
|
|
1374
|
+
* @param scene defines the scene the material belongs to.
|
|
1375
|
+
* @param engine defines the engine the material belongs to.
|
|
1376
|
+
* @param subMesh the submesh to bind data for
|
|
1377
|
+
*/
|
|
1378
|
+
bindPropertiesForSubMesh(uniformBuffer, scene, engine, subMesh) {
|
|
1379
|
+
// If min/max thickness is 0, avoid decomposing to determine the scaled thickness (it's always zero).
|
|
1380
|
+
if (this.geometryThickness === 0.0) {
|
|
1381
|
+
uniformBuffer.updateFloat("vGeometryThickness", 0);
|
|
1382
|
+
}
|
|
1383
|
+
else {
|
|
1384
|
+
subMesh.getRenderingMesh().getWorldMatrix().decompose(TmpVectors.Vector3[0]);
|
|
1385
|
+
const thicknessScale = Math.max(Math.abs(TmpVectors.Vector3[0].x), Math.abs(TmpVectors.Vector3[0].y), Math.abs(TmpVectors.Vector3[0].z));
|
|
1386
|
+
uniformBuffer.updateFloat("vGeometryThickness", this.geometryThickness * thicknessScale);
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1311
1389
|
/**
|
|
1312
1390
|
* Binds the submesh data.
|
|
1313
1391
|
* @param world - The world matrix.
|
|
@@ -1342,6 +1420,7 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1342
1420
|
}
|
|
1343
1421
|
this._eventInfo.subMesh = subMesh;
|
|
1344
1422
|
this._callbackPluginEventHardBindForSubMesh(this._eventInfo);
|
|
1423
|
+
this.bindPropertiesForSubMesh(this._uniformBuffer, scene, scene.getEngine(), subMesh);
|
|
1345
1424
|
// Normal Matrix
|
|
1346
1425
|
if (defines.OBJECTSPACE_NORMALMAP) {
|
|
1347
1426
|
world.toNormalMatrix(this._normalMatrix);
|
|
@@ -1422,7 +1501,13 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1422
1501
|
if (defines.FUZZENVIRONMENTBRDF) {
|
|
1423
1502
|
ubo.setTexture("environmentFuzzBrdfSampler", this._environmentFuzzBRDFTexture);
|
|
1424
1503
|
}
|
|
1425
|
-
if (defines.
|
|
1504
|
+
if (defines.REFRACTED_BACKGROUND) {
|
|
1505
|
+
ubo.setTexture("backgroundRefractionSampler", this._backgroundRefractionTexture);
|
|
1506
|
+
ubo.updateMatrix("backgroundRefractionMatrix", this._backgroundRefractionTexture.getReflectionTextureMatrix());
|
|
1507
|
+
TmpVectors.Vector3[1].set(Math.log2(this._backgroundRefractionTexture.getSize().width), 0, 0);
|
|
1508
|
+
ubo.updateVector3("vBackgroundRefractionInfos", TmpVectors.Vector3[1]);
|
|
1509
|
+
}
|
|
1510
|
+
if (defines.ANISOTROPIC || defines.FUZZ || defines.REFRACTED_BACKGROUND) {
|
|
1426
1511
|
ubo.setTexture("blueNoiseSampler", OpenPBRMaterial._noiseTextures[this.getScene().uniqueId]);
|
|
1427
1512
|
}
|
|
1428
1513
|
}
|
|
@@ -1445,9 +1530,9 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1445
1530
|
BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);
|
|
1446
1531
|
}
|
|
1447
1532
|
// View
|
|
1448
|
-
if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) || radianceTexture || mesh.receiveShadows || defines.PREPASS) {
|
|
1449
|
-
|
|
1450
|
-
}
|
|
1533
|
+
// if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) || radianceTexture || mesh.receiveShadows || defines.PREPASS) {
|
|
1534
|
+
this.bindView(effect);
|
|
1535
|
+
// }
|
|
1451
1536
|
// Fog
|
|
1452
1537
|
BindFogParameters(scene, mesh, this._activeEffect, true);
|
|
1453
1538
|
// Morph targets
|
|
@@ -1546,6 +1631,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1546
1631
|
if (this._environmentFuzzBRDFTexture && this.getScene().environmentFuzzBRDFTexture !== this._environmentFuzzBRDFTexture) {
|
|
1547
1632
|
this._environmentFuzzBRDFTexture.dispose();
|
|
1548
1633
|
}
|
|
1634
|
+
// The refraction texture will be cleaned up by the transmission helper.
|
|
1635
|
+
this._backgroundRefractionTexture = null;
|
|
1549
1636
|
// Loop through samplers and dispose the textures
|
|
1550
1637
|
for (const key in this._samplersList) {
|
|
1551
1638
|
const sampler = this._samplersList[key];
|
|
@@ -1673,24 +1760,22 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1673
1760
|
"morphTargetTextureInfo",
|
|
1674
1761
|
"morphTargetTextureIndices",
|
|
1675
1762
|
"cameraInfo",
|
|
1763
|
+
"backgroundRefractionMatrix",
|
|
1764
|
+
"vBackgroundRefractionInfos",
|
|
1676
1765
|
];
|
|
1677
1766
|
for (const uniformName in this._uniformsList) {
|
|
1678
1767
|
uniforms.push(uniformName);
|
|
1679
1768
|
}
|
|
1680
|
-
const samplers = [
|
|
1681
|
-
"environmentBrdfSampler",
|
|
1682
|
-
"environmentFuzzBrdfSampler",
|
|
1683
|
-
"blueNoiseSampler",
|
|
1684
|
-
"boneSampler",
|
|
1685
|
-
"morphTargets",
|
|
1686
|
-
"oitDepthSampler",
|
|
1687
|
-
"oitFrontColorSampler",
|
|
1688
|
-
"areaLightsLTC1Sampler",
|
|
1689
|
-
"areaLightsLTC2Sampler",
|
|
1690
|
-
];
|
|
1769
|
+
const samplers = ["environmentBrdfSampler", "boneSampler", "morphTargets", "oitDepthSampler", "oitFrontColorSampler", "areaLightsLTC1Sampler", "areaLightsLTC2Sampler"];
|
|
1691
1770
|
if (defines.FUZZENVIRONMENTBRDF) {
|
|
1692
1771
|
samplers.push("environmentFuzzBrdfSampler");
|
|
1693
1772
|
}
|
|
1773
|
+
if (defines.REFRACTED_BACKGROUND) {
|
|
1774
|
+
samplers.push("backgroundRefractionSampler");
|
|
1775
|
+
}
|
|
1776
|
+
if (defines.ANISOTROPIC || defines.FUZZ || defines.REFRACTED_BACKGROUND) {
|
|
1777
|
+
samplers.push("blueNoiseSampler");
|
|
1778
|
+
}
|
|
1694
1779
|
for (const key in this._samplersList) {
|
|
1695
1780
|
const sampler = this._samplersList[key];
|
|
1696
1781
|
samplers.push(sampler.samplerName);
|
|
@@ -1777,7 +1862,6 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1777
1862
|
PrepareDefinesForOIT(scene, defines, oit);
|
|
1778
1863
|
MaterialHelperGeometryRendering.PrepareDefines(engine.currentRenderPassId, mesh, defines);
|
|
1779
1864
|
// Textures
|
|
1780
|
-
defines.METALLICWORKFLOW = true;
|
|
1781
1865
|
if (defines._areTexturesDirty) {
|
|
1782
1866
|
defines._needUVs = false;
|
|
1783
1867
|
for (let i = 1; i <= 6; ++i) {
|
|
@@ -1810,10 +1894,11 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1810
1894
|
defines.SPECULAR_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE = this._useSpecularRoughnessAnisotropyFromTangentTexture;
|
|
1811
1895
|
defines.COAT_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE = this._useCoatRoughnessAnisotropyFromTangentTexture;
|
|
1812
1896
|
defines.COAT_ROUGHNESS_FROM_GREEN_CHANNEL = this._useCoatRoughnessFromGreenChannel;
|
|
1813
|
-
defines.
|
|
1897
|
+
defines.SPECULAR_ROUGHNESS_FROM_METALNESS_TEXTURE_GREEN = this._useRoughnessFromMetallicTextureGreen;
|
|
1814
1898
|
defines.FUZZ_ROUGHNESS_FROM_TEXTURE_ALPHA = this._useFuzzRoughnessFromTextureAlpha;
|
|
1815
|
-
defines.
|
|
1899
|
+
defines.BASE_METALNESS_FROM_METALNESS_TEXTURE_BLUE = this._useMetallicFromMetallicTextureBlue;
|
|
1816
1900
|
defines.THIN_FILM_THICKNESS_FROM_THIN_FILM_TEXTURE = this._useThinFilmThicknessFromTextureGreen;
|
|
1901
|
+
defines.GEOMETRY_THICKNESS_FROM_GREEN_CHANNEL = this._useGeometryThicknessFromGreenChannel;
|
|
1817
1902
|
if (this.geometryNormalTexture) {
|
|
1818
1903
|
if (this._useParallax && this.baseColorTexture && MaterialFlags.DiffuseTextureEnabled) {
|
|
1819
1904
|
defines.PARALLAX = true;
|
|
@@ -1845,6 +1930,24 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1845
1930
|
else {
|
|
1846
1931
|
defines.FUZZENVIRONMENTBRDF = false;
|
|
1847
1932
|
}
|
|
1933
|
+
if (this.transmissionWeight > 0) {
|
|
1934
|
+
defines.REFRACTED_BACKGROUND = !!this._backgroundRefractionTexture && MaterialFlags.RefractionTextureEnabled;
|
|
1935
|
+
defines.REFRACTED_LIGHTS = true;
|
|
1936
|
+
const radianceTexture = this._getRadianceTexture();
|
|
1937
|
+
if (radianceTexture) {
|
|
1938
|
+
defines.REFRACTED_ENVIRONMENT = MaterialFlags.RefractionTextureEnabled;
|
|
1939
|
+
defines.REFRACTED_ENVIRONMENT_OPPOSITEZ = this.getScene().useRightHandedSystem ? !radianceTexture.invertZ : radianceTexture.invertZ;
|
|
1940
|
+
defines.REFRACTED_ENVIRONMENT_LOCAL_CUBE = radianceTexture.isCube && radianceTexture.boundingBoxSize;
|
|
1941
|
+
}
|
|
1942
|
+
else {
|
|
1943
|
+
defines.REFRACTED_ENVIRONMENT = false;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
else {
|
|
1947
|
+
defines.REFRACTED_BACKGROUND = false;
|
|
1948
|
+
defines.REFRACTED_LIGHTS = false;
|
|
1949
|
+
defines.REFRACTED_ENVIRONMENT = false;
|
|
1950
|
+
}
|
|
1848
1951
|
if (this._shouldUseAlphaFromBaseColorTexture()) {
|
|
1849
1952
|
defines.ALPHA_FROM_BASE_COLOR_TEXTURE = true;
|
|
1850
1953
|
}
|
|
@@ -1910,6 +2013,8 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
|
|
|
1910
2013
|
}
|
|
1911
2014
|
defines.THIN_FILM = this.thinFilmWeight > 0.0;
|
|
1912
2015
|
defines.IRIDESCENCE = this.thinFilmWeight > 0.0;
|
|
2016
|
+
defines.DISPERSION = this.transmissionDispersionScale > 0.0;
|
|
2017
|
+
defines.SCATTERING = !this.transmissionScatter.equals(Color3.BlackReadOnly);
|
|
1913
2018
|
defines.FUZZ = this.fuzzWeight > 0 && MaterialFlags.ReflectionTextureEnabled;
|
|
1914
2019
|
if (defines.FUZZ) {
|
|
1915
2020
|
if (!mesh.isVerticesDataPresent(VertexBuffer.TangentKind)) {
|
|
@@ -1948,205 +2053,166 @@ OpenPBRMaterial._noiseTextures = {};
|
|
|
1948
2053
|
* False by default. This is mostly meant for backward compatibility.
|
|
1949
2054
|
*/
|
|
1950
2055
|
OpenPBRMaterial.ForceGLSL = false;
|
|
1951
|
-
__decorate([
|
|
1952
|
-
serialize()
|
|
1953
|
-
], OpenPBRMaterial.prototype, "baseWeight", void 0);
|
|
1954
2056
|
__decorate([
|
|
1955
2057
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseWeight")
|
|
1956
2058
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1957
2059
|
], OpenPBRMaterial.prototype, "_baseWeight", void 0);
|
|
1958
|
-
__decorate([
|
|
1959
|
-
serializeAsTexture()
|
|
1960
|
-
], OpenPBRMaterial.prototype, "baseWeightTexture", void 0);
|
|
1961
2060
|
__decorate([
|
|
1962
2061
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseWeightTexture")
|
|
1963
2062
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1964
2063
|
], OpenPBRMaterial.prototype, "_baseWeightTexture", void 0);
|
|
1965
|
-
__decorate([
|
|
1966
|
-
serializeAsColor3()
|
|
1967
|
-
], OpenPBRMaterial.prototype, "baseColor", void 0);
|
|
1968
2064
|
__decorate([
|
|
1969
2065
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseColor")
|
|
1970
2066
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1971
2067
|
], OpenPBRMaterial.prototype, "_baseColor", void 0);
|
|
1972
|
-
__decorate([
|
|
1973
|
-
serializeAsTexture()
|
|
1974
|
-
], OpenPBRMaterial.prototype, "baseColorTexture", void 0);
|
|
1975
2068
|
__decorate([
|
|
1976
2069
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseColorTexture")
|
|
1977
2070
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1978
2071
|
], OpenPBRMaterial.prototype, "_baseColorTexture", void 0);
|
|
1979
|
-
__decorate([
|
|
1980
|
-
serialize()
|
|
1981
|
-
], OpenPBRMaterial.prototype, "baseDiffuseRoughness", void 0);
|
|
1982
2072
|
__decorate([
|
|
1983
2073
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseDiffuseRoughness")
|
|
1984
2074
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1985
2075
|
], OpenPBRMaterial.prototype, "_baseDiffuseRoughness", void 0);
|
|
1986
|
-
__decorate([
|
|
1987
|
-
serializeAsTexture()
|
|
1988
|
-
], OpenPBRMaterial.prototype, "baseDiffuseRoughnessTexture", void 0);
|
|
1989
2076
|
__decorate([
|
|
1990
2077
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseDiffuseRoughnessTexture")
|
|
1991
2078
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1992
2079
|
], OpenPBRMaterial.prototype, "_baseDiffuseRoughnessTexture", void 0);
|
|
1993
|
-
__decorate([
|
|
1994
|
-
serialize()
|
|
1995
|
-
], OpenPBRMaterial.prototype, "baseMetalness", void 0);
|
|
1996
2080
|
__decorate([
|
|
1997
2081
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseMetalness")
|
|
1998
2082
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1999
2083
|
], OpenPBRMaterial.prototype, "_baseMetalness", void 0);
|
|
2000
|
-
__decorate([
|
|
2001
|
-
serializeAsTexture()
|
|
2002
|
-
], OpenPBRMaterial.prototype, "baseMetalnessTexture", void 0);
|
|
2003
2084
|
__decorate([
|
|
2004
2085
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "baseMetalnessTexture")
|
|
2005
2086
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2006
2087
|
], OpenPBRMaterial.prototype, "_baseMetalnessTexture", void 0);
|
|
2007
|
-
__decorate([
|
|
2008
|
-
serialize()
|
|
2009
|
-
], OpenPBRMaterial.prototype, "specularWeight", void 0);
|
|
2010
2088
|
__decorate([
|
|
2011
2089
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularWeight")
|
|
2012
2090
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2013
2091
|
], OpenPBRMaterial.prototype, "_specularWeight", void 0);
|
|
2014
|
-
__decorate([
|
|
2015
|
-
serializeAsTexture()
|
|
2016
|
-
], OpenPBRMaterial.prototype, "specularWeightTexture", void 0);
|
|
2017
2092
|
__decorate([
|
|
2018
2093
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularWeightTexture")
|
|
2019
2094
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2020
2095
|
], OpenPBRMaterial.prototype, "_specularWeightTexture", void 0);
|
|
2021
|
-
__decorate([
|
|
2022
|
-
serializeAsColor3()
|
|
2023
|
-
], OpenPBRMaterial.prototype, "specularColor", void 0);
|
|
2024
2096
|
__decorate([
|
|
2025
2097
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularColor")
|
|
2026
2098
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2027
2099
|
], OpenPBRMaterial.prototype, "_specularColor", void 0);
|
|
2028
|
-
__decorate([
|
|
2029
|
-
serializeAsTexture()
|
|
2030
|
-
], OpenPBRMaterial.prototype, "specularColorTexture", void 0);
|
|
2031
2100
|
__decorate([
|
|
2032
2101
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularColorTexture")
|
|
2033
2102
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2034
2103
|
], OpenPBRMaterial.prototype, "_specularColorTexture", void 0);
|
|
2035
|
-
__decorate([
|
|
2036
|
-
serialize()
|
|
2037
|
-
], OpenPBRMaterial.prototype, "specularRoughness", void 0);
|
|
2038
2104
|
__decorate([
|
|
2039
2105
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularRoughness")
|
|
2040
2106
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2041
2107
|
], OpenPBRMaterial.prototype, "_specularRoughness", void 0);
|
|
2042
|
-
__decorate([
|
|
2043
|
-
serializeAsTexture()
|
|
2044
|
-
], OpenPBRMaterial.prototype, "specularRoughnessTexture", void 0);
|
|
2045
2108
|
__decorate([
|
|
2046
2109
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularRoughnessTexture")
|
|
2047
2110
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2048
2111
|
], OpenPBRMaterial.prototype, "_specularRoughnessTexture", void 0);
|
|
2049
|
-
__decorate([
|
|
2050
|
-
serialize()
|
|
2051
|
-
], OpenPBRMaterial.prototype, "specularRoughnessAnisotropy", void 0);
|
|
2052
2112
|
__decorate([
|
|
2053
2113
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularRoughnessAnisotropy")
|
|
2054
2114
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2055
2115
|
], OpenPBRMaterial.prototype, "_specularRoughnessAnisotropy", void 0);
|
|
2056
|
-
__decorate([
|
|
2057
|
-
serializeAsTexture()
|
|
2058
|
-
], OpenPBRMaterial.prototype, "specularRoughnessAnisotropyTexture", void 0);
|
|
2059
2116
|
__decorate([
|
|
2060
2117
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularRoughnessAnisotropyTexture")
|
|
2061
2118
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2062
2119
|
], OpenPBRMaterial.prototype, "_specularRoughnessAnisotropyTexture", void 0);
|
|
2063
|
-
__decorate([
|
|
2064
|
-
serialize()
|
|
2065
|
-
], OpenPBRMaterial.prototype, "specularIor", void 0);
|
|
2066
2120
|
__decorate([
|
|
2067
2121
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "specularIor")
|
|
2068
2122
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2069
2123
|
], OpenPBRMaterial.prototype, "_specularIor", void 0);
|
|
2070
2124
|
__decorate([
|
|
2071
|
-
|
|
2072
|
-
|
|
2125
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionWeight")
|
|
2126
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2127
|
+
], OpenPBRMaterial.prototype, "_transmissionWeight", void 0);
|
|
2128
|
+
__decorate([
|
|
2129
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionWeightTexture")
|
|
2130
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2131
|
+
], OpenPBRMaterial.prototype, "_transmissionWeightTexture", void 0);
|
|
2132
|
+
__decorate([
|
|
2133
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionColor")
|
|
2134
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2135
|
+
], OpenPBRMaterial.prototype, "_transmissionColor", void 0);
|
|
2136
|
+
__decorate([
|
|
2137
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionColorTexture")
|
|
2138
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2139
|
+
], OpenPBRMaterial.prototype, "_transmissionColorTexture", void 0);
|
|
2140
|
+
__decorate([
|
|
2141
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionDepth")
|
|
2142
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2143
|
+
], OpenPBRMaterial.prototype, "_transmissionDepth", void 0);
|
|
2144
|
+
__decorate([
|
|
2145
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionDepthTexture")
|
|
2146
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2147
|
+
], OpenPBRMaterial.prototype, "_transmissionDepthTexture", void 0);
|
|
2148
|
+
__decorate([
|
|
2149
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionScatter")
|
|
2150
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2151
|
+
], OpenPBRMaterial.prototype, "_transmissionScatter", void 0);
|
|
2152
|
+
__decorate([
|
|
2153
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionScatterTexture")
|
|
2154
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2155
|
+
], OpenPBRMaterial.prototype, "_transmissionScatterTexture", void 0);
|
|
2156
|
+
__decorate([
|
|
2157
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionScatterAnisotropy")
|
|
2158
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2159
|
+
], OpenPBRMaterial.prototype, "_transmissionScatterAnisotropy", void 0);
|
|
2160
|
+
__decorate([
|
|
2161
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionDispersionScale")
|
|
2162
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2163
|
+
], OpenPBRMaterial.prototype, "_transmissionDispersionScale", void 0);
|
|
2164
|
+
__decorate([
|
|
2165
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionDispersionScaleTexture")
|
|
2166
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2167
|
+
], OpenPBRMaterial.prototype, "_transmissionDispersionScaleTexture", void 0);
|
|
2168
|
+
__decorate([
|
|
2169
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "transmissionDispersionAbbeNumber")
|
|
2170
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2171
|
+
], OpenPBRMaterial.prototype, "_transmissionDispersionAbbeNumber", void 0);
|
|
2073
2172
|
__decorate([
|
|
2074
2173
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatWeight")
|
|
2075
2174
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2076
2175
|
], OpenPBRMaterial.prototype, "_coatWeight", void 0);
|
|
2077
|
-
__decorate([
|
|
2078
|
-
serializeAsTexture()
|
|
2079
|
-
], OpenPBRMaterial.prototype, "coatWeightTexture", void 0);
|
|
2080
2176
|
__decorate([
|
|
2081
2177
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatWeightTexture")
|
|
2082
2178
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2083
2179
|
], OpenPBRMaterial.prototype, "_coatWeightTexture", void 0);
|
|
2084
|
-
__decorate([
|
|
2085
|
-
serializeAsColor3()
|
|
2086
|
-
], OpenPBRMaterial.prototype, "coatColor", void 0);
|
|
2087
2180
|
__decorate([
|
|
2088
2181
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatColor")
|
|
2089
2182
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2090
2183
|
], OpenPBRMaterial.prototype, "_coatColor", void 0);
|
|
2091
|
-
__decorate([
|
|
2092
|
-
serializeAsTexture()
|
|
2093
|
-
], OpenPBRMaterial.prototype, "coatColorTexture", void 0);
|
|
2094
2184
|
__decorate([
|
|
2095
2185
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatColorTexture")
|
|
2096
2186
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2097
2187
|
], OpenPBRMaterial.prototype, "_coatColorTexture", void 0);
|
|
2098
|
-
__decorate([
|
|
2099
|
-
serialize()
|
|
2100
|
-
], OpenPBRMaterial.prototype, "coatRoughness", void 0);
|
|
2101
2188
|
__decorate([
|
|
2102
2189
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatRoughness")
|
|
2103
2190
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2104
2191
|
], OpenPBRMaterial.prototype, "_coatRoughness", void 0);
|
|
2105
|
-
__decorate([
|
|
2106
|
-
serializeAsTexture()
|
|
2107
|
-
], OpenPBRMaterial.prototype, "coatRoughnessTexture", void 0);
|
|
2108
2192
|
__decorate([
|
|
2109
2193
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatRoughnessTexture")
|
|
2110
2194
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2111
2195
|
], OpenPBRMaterial.prototype, "_coatRoughnessTexture", void 0);
|
|
2112
|
-
__decorate([
|
|
2113
|
-
serialize()
|
|
2114
|
-
], OpenPBRMaterial.prototype, "coatRoughnessAnisotropy", void 0);
|
|
2115
2196
|
__decorate([
|
|
2116
2197
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatRoughnessAnisotropy")
|
|
2117
2198
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2118
2199
|
], OpenPBRMaterial.prototype, "_coatRoughnessAnisotropy", void 0);
|
|
2119
|
-
__decorate([
|
|
2120
|
-
serializeAsTexture()
|
|
2121
|
-
], OpenPBRMaterial.prototype, "coatRoughnessAnisotropyTexture", void 0);
|
|
2122
2200
|
__decorate([
|
|
2123
2201
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatRoughnessAnisotropyTexture")
|
|
2124
2202
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2125
2203
|
], OpenPBRMaterial.prototype, "_coatRoughnessAnisotropyTexture", void 0);
|
|
2126
|
-
__decorate([
|
|
2127
|
-
serialize()
|
|
2128
|
-
], OpenPBRMaterial.prototype, "coatIor", void 0);
|
|
2129
2204
|
__decorate([
|
|
2130
2205
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatIor")
|
|
2131
2206
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2132
2207
|
], OpenPBRMaterial.prototype, "_coatIor", void 0);
|
|
2133
|
-
__decorate([
|
|
2134
|
-
serialize()
|
|
2135
|
-
], OpenPBRMaterial.prototype, "coatDarkening", void 0);
|
|
2136
2208
|
__decorate([
|
|
2137
2209
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatDarkening")
|
|
2138
2210
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2139
2211
|
], OpenPBRMaterial.prototype, "_coatDarkening", void 0);
|
|
2140
|
-
__decorate([
|
|
2141
|
-
serializeAsTexture()
|
|
2142
|
-
], OpenPBRMaterial.prototype, "coatDarkeningTexture", void 0);
|
|
2143
2212
|
__decorate([
|
|
2144
2213
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "coatDarkeningTexture")
|
|
2145
2214
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2146
2215
|
], OpenPBRMaterial.prototype, "_coatDarkeningTexture", void 0);
|
|
2147
|
-
__decorate([
|
|
2148
|
-
serialize()
|
|
2149
|
-
], OpenPBRMaterial.prototype, "useCoatRoughnessFromWeightTexture", void 0);
|
|
2150
2216
|
__decorate([
|
|
2151
2217
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "fuzzWeight")
|
|
2152
2218
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -2171,79 +2237,54 @@ __decorate([
|
|
|
2171
2237
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "fuzzRoughnessTexture")
|
|
2172
2238
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2173
2239
|
], OpenPBRMaterial.prototype, "_fuzzRoughnessTexture", void 0);
|
|
2174
|
-
__decorate([
|
|
2175
|
-
serializeAsTexture()
|
|
2176
|
-
], OpenPBRMaterial.prototype, "geometryNormalTexture", void 0);
|
|
2177
2240
|
__decorate([
|
|
2178
2241
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryNormalTexture")
|
|
2179
2242
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2180
2243
|
], OpenPBRMaterial.prototype, "_geometryNormalTexture", void 0);
|
|
2181
|
-
__decorate([
|
|
2182
|
-
serializeAsVector2()
|
|
2183
|
-
], OpenPBRMaterial.prototype, "geometryTangent", void 0);
|
|
2184
2244
|
__decorate([
|
|
2185
2245
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryTangent")
|
|
2186
2246
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2187
2247
|
], OpenPBRMaterial.prototype, "_geometryTangent", void 0);
|
|
2188
|
-
__decorate([
|
|
2189
|
-
serializeAsTexture()
|
|
2190
|
-
], OpenPBRMaterial.prototype, "geometryTangentTexture", void 0);
|
|
2191
2248
|
__decorate([
|
|
2192
2249
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryTangentTexture")
|
|
2193
2250
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2194
2251
|
], OpenPBRMaterial.prototype, "_geometryTangentTexture", void 0);
|
|
2195
|
-
__decorate([
|
|
2196
|
-
serializeAsTexture()
|
|
2197
|
-
], OpenPBRMaterial.prototype, "geometryCoatNormalTexture", void 0);
|
|
2198
2252
|
__decorate([
|
|
2199
2253
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryCoatNormalTexture")
|
|
2200
2254
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2201
2255
|
], OpenPBRMaterial.prototype, "_geometryCoatNormalTexture", void 0);
|
|
2202
|
-
__decorate([
|
|
2203
|
-
serializeAsVector2()
|
|
2204
|
-
], OpenPBRMaterial.prototype, "geometryCoatTangent", void 0);
|
|
2205
2256
|
__decorate([
|
|
2206
2257
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryCoatTangent")
|
|
2207
2258
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2208
2259
|
], OpenPBRMaterial.prototype, "_geometryCoatTangent", void 0);
|
|
2209
|
-
__decorate([
|
|
2210
|
-
serializeAsTexture()
|
|
2211
|
-
], OpenPBRMaterial.prototype, "geometryCoatTangentTexture", void 0);
|
|
2212
2260
|
__decorate([
|
|
2213
2261
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryCoatTangentTexture")
|
|
2214
2262
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2215
2263
|
], OpenPBRMaterial.prototype, "_geometryCoatTangentTexture", void 0);
|
|
2216
|
-
__decorate([
|
|
2217
|
-
serialize()
|
|
2218
|
-
], OpenPBRMaterial.prototype, "geometryOpacity", void 0);
|
|
2219
2264
|
__decorate([
|
|
2220
2265
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryOpacity")
|
|
2221
2266
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2222
2267
|
], OpenPBRMaterial.prototype, "_geometryOpacity", void 0);
|
|
2223
|
-
__decorate([
|
|
2224
|
-
serializeAsTexture()
|
|
2225
|
-
], OpenPBRMaterial.prototype, "geometryOpacityTexture", void 0);
|
|
2226
2268
|
__decorate([
|
|
2227
2269
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryOpacityTexture")
|
|
2228
2270
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2229
2271
|
], OpenPBRMaterial.prototype, "_geometryOpacityTexture", void 0);
|
|
2230
2272
|
__decorate([
|
|
2231
|
-
|
|
2232
|
-
|
|
2273
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryThickness")
|
|
2274
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2275
|
+
], OpenPBRMaterial.prototype, "_geometryThickness", void 0);
|
|
2276
|
+
__decorate([
|
|
2277
|
+
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "geometryThicknessTexture")
|
|
2278
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2279
|
+
], OpenPBRMaterial.prototype, "_geometryThicknessTexture", void 0);
|
|
2233
2280
|
__decorate([
|
|
2234
2281
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "emissionLuminance")
|
|
2235
2282
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2236
2283
|
], OpenPBRMaterial.prototype, "_emissionLuminance", void 0);
|
|
2237
|
-
__decorate([
|
|
2238
|
-
serializeAsColor3()
|
|
2239
|
-
], OpenPBRMaterial.prototype, "emissionColor", void 0);
|
|
2240
2284
|
__decorate([
|
|
2241
2285
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "emissionColor")
|
|
2242
2286
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2243
2287
|
], OpenPBRMaterial.prototype, "_emissionColor", void 0);
|
|
2244
|
-
__decorate([
|
|
2245
|
-
serializeAsTexture()
|
|
2246
|
-
], OpenPBRMaterial.prototype, "emissionColorTexture", void 0);
|
|
2247
2288
|
__decorate([
|
|
2248
2289
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "emissionColorTexture")
|
|
2249
2290
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -2272,9 +2313,6 @@ __decorate([
|
|
|
2272
2313
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "thinFilmIor")
|
|
2273
2314
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2274
2315
|
], OpenPBRMaterial.prototype, "_thinFilmIor", void 0);
|
|
2275
|
-
__decorate([
|
|
2276
|
-
serializeAsTexture()
|
|
2277
|
-
], OpenPBRMaterial.prototype, "ambientOcclusionTexture", void 0);
|
|
2278
2316
|
__decorate([
|
|
2279
2317
|
addAccessorsForMaterialProperty("_markAllSubMeshesAsTexturesDirty", "ambientOcclusionTexture")
|
|
2280
2318
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -2362,7 +2400,6 @@ __decorate([
|
|
|
2362
2400
|
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
2363
2401
|
], OpenPBRMaterial.prototype, "useLinearAlphaFresnel", void 0);
|
|
2364
2402
|
__decorate([
|
|
2365
|
-
serializeAsTexture(),
|
|
2366
2403
|
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
2367
2404
|
], OpenPBRMaterial.prototype, "environmentBRDFTexture", void 0);
|
|
2368
2405
|
__decorate([
|