|
@@ -54,6 +54,7 @@ module BABYLON {
|
|
|
public REFLECTIONOVERALPHA = false;
|
|
|
public INVERTNORMALMAPX = false;
|
|
|
public INVERTNORMALMAPY = false;
|
|
|
+ public TWOSIDEDLIGHTING = false;
|
|
|
public SHADOWFULLFLOAT = false;
|
|
|
public CAMERACOLORGRADING = false;
|
|
|
public CAMERACOLORCURVES = false;
|
|
@@ -183,6 +184,12 @@ module BABYLON {
|
|
|
public invertNormalMapY = false;
|
|
|
|
|
|
/**
|
|
|
+ * If sets to true and backfaceCulling is false, normals will be flipped on the backside.
|
|
|
+ */
|
|
|
+ @serialize()
|
|
|
+ public twoSidedLighting = false;
|
|
|
+
|
|
|
+ /**
|
|
|
* Color Grading 2D Lookup Texture.
|
|
|
* This allows special effects like sepia, black and white to sixties rendering style.
|
|
|
*/
|
|
@@ -461,6 +468,10 @@ module BABYLON {
|
|
|
this._defines.CAMERACOLORGRADING = true;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (!this.backFaceCulling && this.twoSidedLighting) {
|
|
|
+ this._defines.TWOSIDEDLIGHTING = true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Effect
|