Browse Source

aoScale -> aoMapScale.

Ben Houston 10 years ago
parent
commit
c3d026c8ea

+ 2 - 2
editor/js/Sidebar.Material.js

@@ -625,7 +625,7 @@ Sidebar.Material = function ( editor ) {
 				if ( objectHasUvs ) {
 
 					material.aoMap = aoMapEnabled ? materialAOMap.getValue() : null;
-					material.aoScale = materialAOScale.getValue();
+					material.oaMapScale = materialAOScale.getValue();
 					material.needsUpdate = true;
 
 				} else {
@@ -866,7 +866,7 @@ Sidebar.Material = function ( editor ) {
 
 				materialAOMapEnabled.setValue( material.aoMap !== null );
 				materialAOMap.setValue( material.aoMap );
-				materialAOScale.setValue( material.aoScale );
+				materialAOScale.setValue( material.oaMapScale );
 
 			}
 

+ 2 - 2
src/loaders/ObjectLoader.js

@@ -283,8 +283,8 @@ THREE.ObjectLoader.prototype = {
 				if ( data.aoMap !== undefined ) {
 
 					material.aoMap = getTexture( data.aoMap );
-					if ( data.aoScale ) {
-						material.aoScale = data.aoScale;
+					if ( data.aoMapScale ) {
+						material.aoMapScale = data.aoMapScale;
 					}
 				}
 

+ 3 - 3
src/materials/MeshPhongMaterial.js

@@ -15,7 +15,7 @@
  *  lightMapScale: <float>
  *
  *  aoMap: new THREE.Texture( <Image> ),
- *  aoScale: <float>
+ *  oaMapScale: <float>
  *
  *  bumpMap: new THREE.Texture( <Image> ),
  *  bumpScale: <float>,
@@ -72,7 +72,7 @@ THREE.MeshPhongMaterial = function ( parameters ) {
 	this.lightMapScale = null;
 
 	this.aoMap = null;
-	this.aoScale = 1.0;
+	this.oaMapScale = 1.0;
 
 	this.bumpMap = null;
 	this.bumpScale = 1;
@@ -133,7 +133,7 @@ THREE.MeshPhongMaterial.prototype.clone = function () {
 	material.lightMapScale = this.lightMapScale;
 
 	material.aoMap = this.aoMap;
-	material.aoScale = this.aoScale;
+	material.oaMapScale = this.oaMapScale;
 
 	material.bumpMap = this.bumpMap;
 	material.bumpScale = this.bumpScale;

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -4583,7 +4583,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 		uniforms.lightMap.value = material.lightMap;
 		uniforms.lightMapScale.value = material.lightMapScale;
 		uniforms.aoMap.value = material.aoMap;
-		uniforms.aoScale.value = material.aoScale;
+		uniforms.oaMapScale.value = material.oaMapScale;
 		uniforms.specularMap.value = material.specularMap;
 		uniforms.alphaMap.value = material.alphaMap;
 

+ 1 - 1
src/renderers/shaders/ShaderChunk/aomap_fragment.glsl

@@ -1,5 +1,5 @@
 #ifdef USE_AOMAP
 
-	outgoingLight *= ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoScale + 1.0;
+	outgoingLight *= ( texture2D( aoMap, vUv2 ).r - 1.0 ) * oaMapScale + 1.0;
 
 #endif

+ 1 - 1
src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl

@@ -1,6 +1,6 @@
 #ifdef USE_AOMAP
 
 	uniform sampler2D aoMap;
-	uniform float aoScale;
+	uniform float oaMapScale;
 
 #endif

+ 1 - 1
src/renderers/shaders/UniformsLib.js

@@ -16,7 +16,7 @@ THREE.UniformsLib = {
 		"lightMapScale" : { type: "f", value: 1 },
 
 		"aoMap" : { type: "t", value: null },
-		"aoScale" : { type: "f", value: 1 },
+		"oaMapScale" : { type: "f", value: 1 },
 
 		"specularMap" : { type: "t", value: null },
 		"alphaMap" : { type: "t", value: null },