diff --git a/inspector/src/components/actionTabs/tabs/propertyGrids/materials/pbrMaterialPropertyGridComponent.tsx b/inspector/src/components/actionTabs/tabs/propertyGrids/materials/pbrMaterialPropertyGridComponent.tsx index 52e1bb07b5b..7e9c310bfc8 100644 --- a/inspector/src/components/actionTabs/tabs/propertyGrids/materials/pbrMaterialPropertyGridComponent.tsx +++ b/inspector/src/components/actionTabs/tabs/propertyGrids/materials/pbrMaterialPropertyGridComponent.tsx @@ -139,7 +139,7 @@ export class PBRMaterialPropertyGridComponent extends React.Component - + { diff --git a/materialsLibrary/test/addpbr.js b/materialsLibrary/test/addpbr.js index a4fe88480be..e287dcf3722 100644 --- a/materialsLibrary/test/addpbr.js +++ b/materialsLibrary/test/addpbr.js @@ -120,13 +120,7 @@ window.preparePBR = function() { "albedoColorLevel": 1 }); }); - - registerRangeUI("pbr", "indiceOfRefraction", 0, 2, function(value) { - pbr.indexOfRefraction = value; - }, function() { - return pbr.indexOfRefraction; - }); - + registerRangeUI("pbr", "alpha", 0, 1, function(value) { pbr.alpha = value; }, function() { diff --git a/src/Materials/PBR/pbrClearCoatConfiguration.ts b/src/Materials/PBR/pbrClearCoatConfiguration.ts index b4505e970b2..4af17208bd3 100644 --- a/src/Materials/PBR/pbrClearCoatConfiguration.ts +++ b/src/Materials/PBR/pbrClearCoatConfiguration.ts @@ -38,7 +38,7 @@ export class PBRClearCoatConfiguration { * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence * The default fits with a polyurethane material. */ - private static readonly _DefaultIndiceOfRefraction = 1.5; + private static readonly _DefaultIndexOfRefraction = 1.5; @serialize() private _isEnabled = false; @@ -61,15 +61,15 @@ export class PBRClearCoatConfiguration { public roughness: number = 0; @serialize() - private _indiceOfRefraction = PBRClearCoatConfiguration._DefaultIndiceOfRefraction; + private _indexOfRefraction = PBRClearCoatConfiguration._DefaultIndexOfRefraction; /** - * Defines the indice of refraction of the clear coat. + * Defines the index of refraction of the clear coat. * This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence * The default fits with a polyurethane material. * Changing the default value is more performance intensive. */ @expandToProperty("_markAllSubMeshesAsTexturesDirty") - public indiceOfRefraction = PBRClearCoatConfiguration._DefaultIndiceOfRefraction; + public indexOfRefraction = PBRClearCoatConfiguration._DefaultIndexOfRefraction; @serializeAsTexture() private _texture: Nullable = null; @@ -201,7 +201,7 @@ export class PBRClearCoatConfiguration { defines.CLEARCOAT_BUMP = false; } - defines.CLEARCOAT_DEFAULTIOR = this._indiceOfRefraction === PBRClearCoatConfiguration._DefaultIndiceOfRefraction; + defines.CLEARCOAT_DEFAULTIOR = this._indexOfRefraction === PBRClearCoatConfiguration._DefaultIndexOfRefraction; if (this._isTintEnabled) { defines.CLEARCOAT_TINT = true; @@ -265,10 +265,10 @@ export class PBRClearCoatConfiguration { uniformBuffer.updateFloat2("vClearCoatParams", this.intensity, this.roughness); // Clear Coat Refraction params - const a = 1 - this._indiceOfRefraction; - const b = 1 + this._indiceOfRefraction; + const a = 1 - this._indexOfRefraction; + const b = 1 + this._indexOfRefraction; const f0 = Math.pow((-a / b), 2); // Schlicks approx: (ior1 - ior2) / (ior1 + ior2) where ior2 for air is close to vacuum = 1. - const eta = 1 / this._indiceOfRefraction; + const eta = 1 / this._indexOfRefraction; uniformBuffer.updateFloat4("vClearCoatRefractionParams", f0, eta, a, b); if (this._isTintEnabled) { diff --git a/src/Materials/PBR/pbrSubSurfaceConfiguration.ts b/src/Materials/PBR/pbrSubSurfaceConfiguration.ts index b2a33fed53a..90980e525f0 100644 --- a/src/Materials/PBR/pbrSubSurfaceConfiguration.ts +++ b/src/Materials/PBR/pbrSubSurfaceConfiguration.ts @@ -114,7 +114,7 @@ export class PBRSubSurfaceConfiguration { private _indexOfRefraction = 1; /** - * Defines the indice of refraction used in the material. + * Defines the index of refraction used in the material. * https://en.wikipedia.org/wiki/List_of_refractive_indices */ @serialize() diff --git a/src/Materials/standardMaterial.ts b/src/Materials/standardMaterial.ts index e0e039ee12b..d5a0b8f7fe0 100644 --- a/src/Materials/standardMaterial.ts +++ b/src/Materials/standardMaterial.ts @@ -371,7 +371,7 @@ export class StandardMaterial extends PushMaterial { public roughness: number; /** - * In case of refraction, define the value of the indice of refraction. + * In case of refraction, define the value of the index of refraction. * @see http://doc.babylonjs.com/how_to/reflect#how-to-obtain-reflections-and-refractions */ @serialize()