|
@@ -67,7 +67,8 @@ var BABYLON;
|
|
this.REFRACTION = false;
|
|
this.REFRACTION = false;
|
|
this.REFRACTIONMAP_3D = false;
|
|
this.REFRACTIONMAP_3D = false;
|
|
this.REFLECTIONOVERALPHA = false;
|
|
this.REFLECTIONOVERALPHA = false;
|
|
- this.OPENGLNORMALMAP = false;
|
|
|
|
|
|
+ this.INVERTNORMALMAPX = false;
|
|
|
|
+ this.INVERTNORMALMAPY = false;
|
|
this.rebuild();
|
|
this.rebuild();
|
|
}
|
|
}
|
|
return StandardMaterialDefines;
|
|
return StandardMaterialDefines;
|
|
@@ -99,9 +100,13 @@ var BABYLON;
|
|
this.useGlossinessFromSpecularMapAlpha = false;
|
|
this.useGlossinessFromSpecularMapAlpha = false;
|
|
this.maxSimultaneousLights = 4;
|
|
this.maxSimultaneousLights = 4;
|
|
/**
|
|
/**
|
|
- * If sets to true, normal map will be considered following OpenGL convention.
|
|
|
|
|
|
+ * If sets to true, x component of normal map value will invert (x = 1.0 - x).
|
|
*/
|
|
*/
|
|
- this.useOpenGLNormalMap = false;
|
|
|
|
|
|
+ this.invertNormalMapX = false;
|
|
|
|
+ /**
|
|
|
|
+ * If sets to true, y component of normal map value will invert (y = 1.0 - y).
|
|
|
|
+ */
|
|
|
|
+ this.invertNormalMapY = false;
|
|
this._renderTargets = new BABYLON.SmartArray(16);
|
|
this._renderTargets = new BABYLON.SmartArray(16);
|
|
this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
|
|
this._worldViewProjectionMatrix = BABYLON.Matrix.Zero();
|
|
this._globalAmbientColor = new BABYLON.Color3(0, 0, 0);
|
|
this._globalAmbientColor = new BABYLON.Color3(0, 0, 0);
|
|
@@ -292,8 +297,11 @@ var BABYLON;
|
|
this._defines.PARALLAXOCCLUSION = true;
|
|
this._defines.PARALLAXOCCLUSION = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.useOpenGLNormalMap) {
|
|
|
|
- this._defines.OPENGLNORMALMAP = true;
|
|
|
|
|
|
+ if (this.invertNormalMapX) {
|
|
|
|
+ this._defines.INVERTNORMALMAPX = true;
|
|
|
|
+ }
|
|
|
|
+ if (this.invertNormalMapY) {
|
|
|
|
+ this._defines.INVERTNORMALMAPY = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -827,7 +835,10 @@ var BABYLON;
|
|
], StandardMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
], StandardMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
__decorate([
|
|
__decorate([
|
|
BABYLON.serialize()
|
|
BABYLON.serialize()
|
|
- ], StandardMaterial.prototype, "useOpenGLNormalMap", void 0);
|
|
|
|
|
|
+ ], StandardMaterial.prototype, "invertNormalMapX", void 0);
|
|
|
|
+ __decorate([
|
|
|
|
+ BABYLON.serialize()
|
|
|
|
+ ], StandardMaterial.prototype, "invertNormalMapY", void 0);
|
|
__decorate([
|
|
__decorate([
|
|
BABYLON.serialize()
|
|
BABYLON.serialize()
|
|
], StandardMaterial.prototype, "useLogarithmicDepth", null);
|
|
], StandardMaterial.prototype, "useLogarithmicDepth", null);
|