From 57d4a82977a1f0e809511fe894886f88581d9615 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 14 Mar 2012 16:22:22 -0700 Subject: Corrections for Uber shader IO --- js/lib/rdge/materials/uber-material.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/lib/rdge') diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 8ec5b05c..91f43754 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js @@ -477,7 +477,7 @@ var UberMaterial = function UberMaterial() { if(environmentMap) { this.setProperty( "environmentMap", environmentMap ); - this.setProperty( "environmentAmount", Number( pu.nextValue( "envReflection" ) ) ); + this.setProperty( "environmentAmount", Number( pu.nextValue( "environmentAmount" ) ) ); } this.rebuildShader(); @@ -495,10 +495,10 @@ var UberMaterial = function UberMaterial() { if (typeof caps.material != 'undefined') { exportStr += "materialProps: true\n"; - exportStr += "ambientColor: " + caps.material.ambientColor + "\n"; - exportStr += "diffuseColor: " + caps.material.diffuseColor + "\n"; - exportStr += "specularColor: " + caps.material.specularColor + "\n"; - exportStr += "specularPower: " + caps.material.specularPower + "\n"; + exportStr += "ambientColor: " + this._ambientColor + "\n"; + exportStr += "diffuseColor: " + this._diffuseColor + "\n"; + exportStr += "specularColor: " + this._specularColor + "\n"; + exportStr += "specularPower: " + this._specularPower + "\n"; } if (typeof caps.lighting != 'undefined') @@ -559,7 +559,7 @@ var UberMaterial = function UberMaterial() { if(typeof caps.environmentMap != 'undefined') { exportStr += "environmentMap: " + caps.environmentMap.texture + "\n"; - exportStr += "envReflection: " + caps.environmentMap.envReflection + "\n"; + exportStr += "environmentAmount: " + caps.environmentMap.envReflection + "\n"; } // every material needs to terminate like this -- cgit v1.2.3