|
@@ -29,6 +29,7 @@ import { ClearCoatBlock } from './clearCoatBlock';
|
|
import { SubSurfaceBlock } from './subSurfaceBlock';
|
|
import { SubSurfaceBlock } from './subSurfaceBlock';
|
|
import { RefractionBlock } from './refractionBlock';
|
|
import { RefractionBlock } from './refractionBlock';
|
|
import { PerturbNormalBlock } from '../Fragment/perturbNormalBlock';
|
|
import { PerturbNormalBlock } from '../Fragment/perturbNormalBlock';
|
|
|
|
+import { Constants } from '../../../../Engines/constants';
|
|
|
|
|
|
const mapOutputToVariable: { [name: string] : [string, string] } = {
|
|
const mapOutputToVariable: { [name: string] : [string, string] } = {
|
|
"ambient": ["finalAmbient", ""],
|
|
"ambient": ["finalAmbient", ""],
|
|
@@ -76,7 +77,6 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
this.registerInput("perturbedNormal", NodeMaterialBlockConnectionPointTypes.Vector4, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("perturbedNormal", NodeMaterialBlockConnectionPointTypes.Vector4, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("cameraPosition", NodeMaterialBlockConnectionPointTypes.Vector3, false, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("cameraPosition", NodeMaterialBlockConnectionPointTypes.Vector3, false, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("baseColor", NodeMaterialBlockConnectionPointTypes.Color4, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("baseColor", NodeMaterialBlockConnectionPointTypes.Color4, true, NodeMaterialBlockTargets.Fragment);
|
|
- this.registerInput("baseTexture", NodeMaterialBlockConnectionPointTypes.Color4, true, NodeMaterialBlockTargets.Fragment);
|
|
|
|
this.registerInput("opacityTexture", NodeMaterialBlockConnectionPointTypes.Color4, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("opacityTexture", NodeMaterialBlockConnectionPointTypes.Color4, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("ambientColor", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("ambientColor", NodeMaterialBlockConnectionPointTypes.Color3, true, NodeMaterialBlockTargets.Fragment);
|
|
this.registerInput("reflectivity", NodeMaterialBlockConnectionPointTypes.Object, false, NodeMaterialBlockTargets.Fragment,
|
|
this.registerInput("reflectivity", NodeMaterialBlockConnectionPointTypes.Object, false, NodeMaterialBlockTargets.Fragment,
|
|
@@ -195,6 +195,22 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
public enableSpecularAntiAliasing: boolean = false;
|
|
public enableSpecularAntiAliasing: boolean = false;
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * Enables realtime filtering on the texture.
|
|
|
|
+ */
|
|
|
|
+ @editableInPropertyPage("Realtime filtering", PropertyTypeForEdition.Boolean, "RENDERING", { "notifiers": { "update": true }})
|
|
|
|
+ public realTimeFiltering: boolean = false;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Quality switch for realtime filtering
|
|
|
|
+ */
|
|
|
|
+ @editableInPropertyPage("Realtime filtering quality", PropertyTypeForEdition.List, "RENDERING", { "notifiers": { "update": true }, "options": [
|
|
|
|
+ { label: "Low", value: Constants.TEXTURE_FILTERING_QUALITY_LOW },
|
|
|
|
+ { label: "Medium", value: Constants.TEXTURE_FILTERING_QUALITY_MEDIUM },
|
|
|
|
+ { label: "High", value: Constants.TEXTURE_FILTERING_QUALITY_HIGH },
|
|
|
|
+ ]})
|
|
|
|
+ public realTimeFilteringQuality = Constants.TEXTURE_FILTERING_QUALITY_LOW;
|
|
|
|
+
|
|
|
|
+ /**
|
|
* Defines if the material uses energy conservation.
|
|
* Defines if the material uses energy conservation.
|
|
*/
|
|
*/
|
|
@editableInPropertyPage("Energy Conservation", PropertyTypeForEdition.Boolean, "ADVANCED", { "notifiers": { "update": true }})
|
|
@editableInPropertyPage("Energy Conservation", PropertyTypeForEdition.Boolean, "ADVANCED", { "notifiers": { "update": true }})
|
|
@@ -398,73 +414,66 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Gets the base texture input component
|
|
|
|
- */
|
|
|
|
- public get baseTexture(): NodeMaterialConnectionPoint {
|
|
|
|
- return this._inputs[5];
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
* Gets the opacity texture input component
|
|
* Gets the opacity texture input component
|
|
*/
|
|
*/
|
|
public get opacityTexture(): NodeMaterialConnectionPoint {
|
|
public get opacityTexture(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[6];
|
|
|
|
|
|
+ return this._inputs[5];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the ambient color input component
|
|
* Gets the ambient color input component
|
|
*/
|
|
*/
|
|
public get ambientColor(): NodeMaterialConnectionPoint {
|
|
public get ambientColor(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[7];
|
|
|
|
|
|
+ return this._inputs[6];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the reflectivity object parameters
|
|
* Gets the reflectivity object parameters
|
|
*/
|
|
*/
|
|
public get reflectivity(): NodeMaterialConnectionPoint {
|
|
public get reflectivity(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[8];
|
|
|
|
|
|
+ return this._inputs[7];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the ambient occlusion object parameters
|
|
* Gets the ambient occlusion object parameters
|
|
*/
|
|
*/
|
|
public get ambientOcclusion(): NodeMaterialConnectionPoint {
|
|
public get ambientOcclusion(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[9];
|
|
|
|
|
|
+ return this._inputs[8];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the reflection object parameters
|
|
* Gets the reflection object parameters
|
|
*/
|
|
*/
|
|
public get reflection(): NodeMaterialConnectionPoint {
|
|
public get reflection(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[10];
|
|
|
|
|
|
+ return this._inputs[9];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the sheen object parameters
|
|
* Gets the sheen object parameters
|
|
*/
|
|
*/
|
|
public get sheen(): NodeMaterialConnectionPoint {
|
|
public get sheen(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[11];
|
|
|
|
|
|
+ return this._inputs[10];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the clear coat object parameters
|
|
* Gets the clear coat object parameters
|
|
*/
|
|
*/
|
|
public get clearcoat(): NodeMaterialConnectionPoint {
|
|
public get clearcoat(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[12];
|
|
|
|
|
|
+ return this._inputs[11];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the sub surface object parameters
|
|
* Gets the sub surface object parameters
|
|
*/
|
|
*/
|
|
public get subsurface(): NodeMaterialConnectionPoint {
|
|
public get subsurface(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[13];
|
|
|
|
|
|
+ return this._inputs[12];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* Gets the anisotropy object parameters
|
|
* Gets the anisotropy object parameters
|
|
*/
|
|
*/
|
|
public get anisotropy(): NodeMaterialConnectionPoint {
|
|
public get anisotropy(): NodeMaterialConnectionPoint {
|
|
- return this._inputs[14];
|
|
|
|
|
|
+ return this._inputs[13];
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -580,7 +589,6 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
defines.setValue("LODBASEDMICROSFURACE", this._scene.getEngine().getCaps().textureLOD);
|
|
defines.setValue("LODBASEDMICROSFURACE", this._scene.getEngine().getCaps().textureLOD);
|
|
|
|
|
|
// Albedo & Opacity
|
|
// Albedo & Opacity
|
|
- defines.setValue("ALBEDO", this.baseTexture.isConnected, true);
|
|
|
|
defines.setValue("OPACITY", this.opacityTexture.isConnected, true);
|
|
defines.setValue("OPACITY", this.opacityTexture.isConnected, true);
|
|
|
|
|
|
// Lighting & colors
|
|
// Lighting & colors
|
|
@@ -606,6 +614,12 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
defines.setValue("RADIANCEOVERALPHA", this.useRadianceOverAlpha, true);
|
|
defines.setValue("RADIANCEOVERALPHA", this.useRadianceOverAlpha, true);
|
|
defines.setValue("SPECULAROVERALPHA", this.useSpecularOverAlpha, true);
|
|
defines.setValue("SPECULAROVERALPHA", this.useSpecularOverAlpha, true);
|
|
defines.setValue("SPECULARAA", this._scene.getEngine().getCaps().standardDerivatives && this.enableSpecularAntiAliasing, true);
|
|
defines.setValue("SPECULARAA", this._scene.getEngine().getCaps().standardDerivatives && this.enableSpecularAntiAliasing, true);
|
|
|
|
+ defines.setValue("REALTIME_FILTERING", this.realTimeFiltering, true);
|
|
|
|
+ defines.setValue("NUM_SAMPLES", "" + this.realTimeFilteringQuality, true);
|
|
|
|
+
|
|
|
|
+ if (this._scene.getEngine().webGLVersion > 1) {
|
|
|
|
+ defines.setValue("NUM_SAMPLES", this.realTimeFilteringQuality + "u", true);
|
|
|
|
+ }
|
|
|
|
|
|
// Advanced
|
|
// Advanced
|
|
defines.setValue("BRDF_V_HEIGHT_CORRELATED", true);
|
|
defines.setValue("BRDF_V_HEIGHT_CORRELATED", true);
|
|
@@ -756,13 +770,12 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
let code = `albedoOpacityOutParams albedoOpacityOut;\r\n`;
|
|
let code = `albedoOpacityOutParams albedoOpacityOut;\r\n`;
|
|
|
|
|
|
const albedoColor = this.baseColor.isConnected ? this.baseColor.associatedVariableName : "vec4(1., 1., 1., 1.)";
|
|
const albedoColor = this.baseColor.isConnected ? this.baseColor.associatedVariableName : "vec4(1., 1., 1., 1.)";
|
|
- const albedoTexture = this.baseTexture.isConnected ? this.baseTexture.associatedVariableName : "";
|
|
|
|
const opacityTexture = this.opacityTexture.isConnected ? this.opacityTexture.associatedVariableName : "";
|
|
const opacityTexture = this.opacityTexture.isConnected ? this.opacityTexture.associatedVariableName : "";
|
|
|
|
|
|
code += `albedoOpacityBlock(
|
|
code += `albedoOpacityBlock(
|
|
${albedoColor},
|
|
${albedoColor},
|
|
#ifdef ALBEDO
|
|
#ifdef ALBEDO
|
|
- ${albedoTexture},
|
|
|
|
|
|
+ vec4(1.),
|
|
vec2(1., 1.),
|
|
vec2(1., 1.),
|
|
#endif
|
|
#endif
|
|
#ifdef OPACITY
|
|
#ifdef OPACITY
|
|
@@ -834,6 +847,7 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
}
|
|
}
|
|
|
|
|
|
state._emitFunctionFromInclude("helperFunctions", comments);
|
|
state._emitFunctionFromInclude("helperFunctions", comments);
|
|
|
|
+ state._emitFunctionFromInclude("importanceSampling", comments);
|
|
state._emitFunctionFromInclude("pbrHelperFunctions", comments);
|
|
state._emitFunctionFromInclude("pbrHelperFunctions", comments);
|
|
state._emitFunctionFromInclude("imageProcessingFunctions", comments);
|
|
state._emitFunctionFromInclude("imageProcessingFunctions", comments);
|
|
|
|
|
|
@@ -851,6 +865,7 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
|
|
|
|
state._emitFunctionFromInclude("pbrDirectLightingFalloffFunctions", comments);
|
|
state._emitFunctionFromInclude("pbrDirectLightingFalloffFunctions", comments);
|
|
state._emitFunctionFromInclude("pbrBRDFFunctions", comments);
|
|
state._emitFunctionFromInclude("pbrBRDFFunctions", comments);
|
|
|
|
+ state._emitFunctionFromInclude("hdrFilteringFunctions", comments);
|
|
|
|
|
|
state._emitFunctionFromInclude("pbrDirectLightingFunctions", comments, {
|
|
state._emitFunctionFromInclude("pbrDirectLightingFunctions", comments, {
|
|
replaceStrings: [
|
|
replaceStrings: [
|
|
@@ -913,9 +928,18 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
#else\r\n`;
|
|
#else\r\n`;
|
|
|
|
|
|
// _____________________________ Reflectivity _______________________________
|
|
// _____________________________ Reflectivity _______________________________
|
|
|
|
+ const subsurfaceBlock = this.subsurface.isConnected ? this.subsurface.connectedPoint?.ownerBlock as SubSurfaceBlock : null;
|
|
|
|
+ const refractionBlock = this.subsurface.isConnected ? (this.subsurface.connectedPoint?.ownerBlock as SubSurfaceBlock).refraction.connectedPoint?.ownerBlock as RefractionBlock : null;
|
|
|
|
+
|
|
|
|
+ const reflectivityBlock = this.reflectivity.connectedPoint?.ownerBlock as Nullable<ReflectivityBlock> ?? null;
|
|
|
|
+
|
|
|
|
+ if (reflectivityBlock) {
|
|
|
|
+ reflectivityBlock.indexOfRefractionConnectionPoint = refractionBlock?.indexOfRefraction ?? null;
|
|
|
|
+ }
|
|
|
|
+
|
|
const aoIntensity = aoBlock?.intensity.isConnected ? aoBlock.intensity.associatedVariableName : "1.";
|
|
const aoIntensity = aoBlock?.intensity.isConnected ? aoBlock.intensity.associatedVariableName : "1.";
|
|
|
|
|
|
- state.compilationString += (this.reflectivity.connectedPoint?.ownerBlock as Nullable<ReflectivityBlock>)?.getCode(aoIntensity) ?? "";
|
|
|
|
|
|
+ state.compilationString += reflectivityBlock?.getCode(state, aoIntensity) ?? "";
|
|
|
|
|
|
// _____________________________ Geometry info _________________________________
|
|
// _____________________________ Geometry info _________________________________
|
|
state.compilationString += state._emitCodeFromInclude("pbrBlockGeometryInfo", comments, {
|
|
state.compilationString += state._emitCodeFromInclude("pbrBlockGeometryInfo", comments, {
|
|
@@ -949,12 +973,16 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
{ search: /REFLECTIONMAP_SKYBOX/g, replace: reflectionBlock?._defineSkyboxName ?? "REFLECTIONMAP_SKYBOX" },
|
|
{ search: /REFLECTIONMAP_SKYBOX/g, replace: reflectionBlock?._defineSkyboxName ?? "REFLECTIONMAP_SKYBOX" },
|
|
{ search: /LODINREFLECTIONALPHA/g, replace: reflectionBlock?._defineLODReflectionAlpha ?? "LODINREFLECTIONALPHA" },
|
|
{ search: /LODINREFLECTIONALPHA/g, replace: reflectionBlock?._defineLODReflectionAlpha ?? "LODINREFLECTIONALPHA" },
|
|
{ search: /LINEARSPECULARREFLECTION/g, replace: reflectionBlock?._defineLinearSpecularReflection ?? "LINEARSPECULARREFLECTION" },
|
|
{ search: /LINEARSPECULARREFLECTION/g, replace: reflectionBlock?._defineLinearSpecularReflection ?? "LINEARSPECULARREFLECTION" },
|
|
|
|
+ { search: /vReflectionFilteringInfo/g, replace: reflectionBlock?._vReflectionFilteringInfoName ?? "vReflectionFilteringInfo" },
|
|
]
|
|
]
|
|
});
|
|
});
|
|
|
|
|
|
// ___________________ Compute Reflectance aka R0 F0 info _________________________
|
|
// ___________________ Compute Reflectance aka R0 F0 info _________________________
|
|
- state.compilationString += state._emitCodeFromInclude("pbrBlockReflectance0", comments);
|
|
|
|
-
|
|
|
|
|
|
+ state.compilationString += state._emitCodeFromInclude("pbrBlockReflectance0", comments, {
|
|
|
|
+ replaceStrings: [
|
|
|
|
+ { search: /metallicReflectanceFactors/g, replace: reflectivityBlock?._vMetallicReflectanceFactorsName ?? "metallicReflectanceFactors" },
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
// ________________________________ Sheen ______________________________
|
|
// ________________________________ Sheen ______________________________
|
|
const sheenBlock = this.sheen.isConnected ? this.sheen.connectedPoint?.ownerBlock as SheenBlock : null;
|
|
const sheenBlock = this.sheen.isConnected ? this.sheen.connectedPoint?.ownerBlock as SheenBlock : null;
|
|
|
|
|
|
@@ -1006,9 +1034,6 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
});
|
|
});
|
|
|
|
|
|
// ___________________________________ SubSurface ______________________________________
|
|
// ___________________________________ SubSurface ______________________________________
|
|
- const subsurfaceBlock = this.subsurface.isConnected ? this.subsurface.connectedPoint?.ownerBlock as SubSurfaceBlock : null;
|
|
|
|
- const refractionBlock = this.subsurface.isConnected ? (this.subsurface.connectedPoint?.ownerBlock as SubSurfaceBlock).refraction.connectedPoint?.ownerBlock as RefractionBlock : null;
|
|
|
|
-
|
|
|
|
state.compilationString += SubSurfaceBlock.GetCode(state, subsurfaceBlock, reflectionBlock, worldPosVarName);
|
|
state.compilationString += SubSurfaceBlock.GetCode(state, subsurfaceBlock, reflectionBlock, worldPosVarName);
|
|
|
|
|
|
state._emitFunctionFromInclude("pbrBlockSubSurface", comments, {
|
|
state._emitFunctionFromInclude("pbrBlockSubSurface", comments, {
|
|
@@ -1080,7 +1105,7 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
replaceStrings: [
|
|
replaceStrings: [
|
|
{ search: /vNormalW/g, replace: this._vNormalWName },
|
|
{ search: /vNormalW/g, replace: this._vNormalWName },
|
|
{ search: /vPositionW/g, replace: worldPosVarName },
|
|
{ search: /vPositionW/g, replace: worldPosVarName },
|
|
- { search: /albedoTexture\.rgb;/g, replace: this.baseTexture.associatedVariableName + ".rgb;\r\ngl_FragColor.rgb = toGammaSpace(gl_FragColor.rgb);\r\n" },
|
|
|
|
|
|
+ { search: /albedoTexture\.rgb;/g, replace: "vec3(1.);\r\ngl_FragColor.rgb = toGammaSpace(gl_FragColor.rgb);\r\n" },
|
|
{ search: /opacityMap/g, replace: this.opacityTexture.associatedVariableName },
|
|
{ search: /opacityMap/g, replace: this.opacityTexture.associatedVariableName },
|
|
]
|
|
]
|
|
});
|
|
});
|
|
@@ -1121,6 +1146,8 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
codeString += `${this._codeVariableName}.useRadianceOverAlpha = ${this.useRadianceOverAlpha};\r\n`;
|
|
codeString += `${this._codeVariableName}.useRadianceOverAlpha = ${this.useRadianceOverAlpha};\r\n`;
|
|
codeString += `${this._codeVariableName}.useSpecularOverAlpha = ${this.useSpecularOverAlpha};\r\n`;
|
|
codeString += `${this._codeVariableName}.useSpecularOverAlpha = ${this.useSpecularOverAlpha};\r\n`;
|
|
codeString += `${this._codeVariableName}.enableSpecularAntiAliasing = ${this.enableSpecularAntiAliasing};\r\n`;
|
|
codeString += `${this._codeVariableName}.enableSpecularAntiAliasing = ${this.enableSpecularAntiAliasing};\r\n`;
|
|
|
|
+ codeString += `${this._codeVariableName}.realTimeFiltering = ${this.realTimeFiltering};\r\n`;
|
|
|
|
+ codeString += `${this._codeVariableName}.realTimeFilteringQuality = ${this.realTimeFilteringQuality};\r\n`;
|
|
codeString += `${this._codeVariableName}.useEnergyConservation = ${this.useEnergyConservation};\r\n`;
|
|
codeString += `${this._codeVariableName}.useEnergyConservation = ${this.useEnergyConservation};\r\n`;
|
|
codeString += `${this._codeVariableName}.useRadianceOcclusion = ${this.useRadianceOcclusion};\r\n`;
|
|
codeString += `${this._codeVariableName}.useRadianceOcclusion = ${this.useRadianceOcclusion};\r\n`;
|
|
codeString += `${this._codeVariableName}.useHorizonOcclusion = ${this.useHorizonOcclusion};\r\n`;
|
|
codeString += `${this._codeVariableName}.useHorizonOcclusion = ${this.useHorizonOcclusion};\r\n`;
|
|
@@ -1149,6 +1176,8 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
serializationObject.useRadianceOverAlpha = this.useRadianceOverAlpha;
|
|
serializationObject.useRadianceOverAlpha = this.useRadianceOverAlpha;
|
|
serializationObject.useSpecularOverAlpha = this.useSpecularOverAlpha;
|
|
serializationObject.useSpecularOverAlpha = this.useSpecularOverAlpha;
|
|
serializationObject.enableSpecularAntiAliasing = this.enableSpecularAntiAliasing;
|
|
serializationObject.enableSpecularAntiAliasing = this.enableSpecularAntiAliasing;
|
|
|
|
+ serializationObject.realTimeFiltering = this.realTimeFiltering;
|
|
|
|
+ serializationObject.realTimeFilteringQuality = this.realTimeFilteringQuality;
|
|
serializationObject.useEnergyConservation = this.useEnergyConservation;
|
|
serializationObject.useEnergyConservation = this.useEnergyConservation;
|
|
serializationObject.useRadianceOcclusion = this.useRadianceOcclusion;
|
|
serializationObject.useRadianceOcclusion = this.useRadianceOcclusion;
|
|
serializationObject.useHorizonOcclusion = this.useHorizonOcclusion;
|
|
serializationObject.useHorizonOcclusion = this.useHorizonOcclusion;
|
|
@@ -1177,6 +1206,8 @@ export class PBRMetallicRoughnessBlock extends NodeMaterialBlock {
|
|
this.useRadianceOverAlpha = serializationObject.useRadianceOverAlpha;
|
|
this.useRadianceOverAlpha = serializationObject.useRadianceOverAlpha;
|
|
this.useSpecularOverAlpha = serializationObject.useSpecularOverAlpha;
|
|
this.useSpecularOverAlpha = serializationObject.useSpecularOverAlpha;
|
|
this.enableSpecularAntiAliasing = serializationObject.enableSpecularAntiAliasing;
|
|
this.enableSpecularAntiAliasing = serializationObject.enableSpecularAntiAliasing;
|
|
|
|
+ this.realTimeFiltering = !!serializationObject.realTimeFiltering;
|
|
|
|
+ this.realTimeFilteringQuality = serializationObject.realTimeFilteringQuality ?? Constants.TEXTURE_FILTERING_QUALITY_LOW;
|
|
this.useEnergyConservation = serializationObject.useEnergyConservation;
|
|
this.useEnergyConservation = serializationObject.useEnergyConservation;
|
|
this.useRadianceOcclusion = serializationObject.useRadianceOcclusion;
|
|
this.useRadianceOcclusion = serializationObject.useRadianceOcclusion;
|
|
this.useHorizonOcclusion = serializationObject.useHorizonOcclusion;
|
|
this.useHorizonOcclusion = serializationObject.useHorizonOcclusion;
|