提交 50c847ce 编写于 作者: B Ben Houston

lightScale --> lightMapScale.

上级 b593b45f
......@@ -153,7 +153,7 @@
loader.load( "obj/lightmap/lightmap.js", function ( geometry, materials ) {
for( var i = 0; i < materials.length; i ++ ) {
materials[i].lightScale = 0.75;
materials[i].lightMapScale = 0.75;
}
var mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial( materials ) );
......
......@@ -12,7 +12,7 @@
* map: new THREE.Texture( <Image> ),
*
* lightMap: new THREE.Texture( <Image> ),
* lightScale: <float>
* lightMapScale: <float>
*
* aoMap: new THREE.Texture( <Image> ),
* aoScale: <float>
......@@ -69,7 +69,7 @@ THREE.MeshPhongMaterial = function ( parameters ) {
this.map = null;
this.lightMap = null;
this.lightScale = null;
this.lightMapScale = null;
this.aoMap = null;
this.aoScale = 1.0;
......@@ -130,7 +130,7 @@ THREE.MeshPhongMaterial.prototype.clone = function () {
material.map = this.map;
material.lightMap = this.lightMap;
material.lightScale = this.lightScale;
material.lightMapScale = this.lightMapScale;
material.aoMap = this.aoMap;
material.aoScale = this.aoScale;
......
......@@ -4596,7 +4596,7 @@ THREE.WebGLRenderer = function ( parameters ) {
uniforms.map.value = material.map;
uniforms.lightMap.value = material.lightMap;
uniforms.lightScale.value = material.lightScale;
uniforms.lightMapScale.value = material.lightMapScale;
uniforms.aoMap.value = material.aoMap;
uniforms.aoScale.value = material.aoScale;
uniforms.specularMap.value = material.specularMap;
......
#ifdef USE_LIGHTMAP
outgoingLight += diffuseColor.xyz * texture2D( lightMap, vUv2 ).xyz * lightScale;
outgoingLight += diffuseColor.xyz * texture2D( lightMap, vUv2 ).xyz * lightMapScale;
#endif
\ No newline at end of file
#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightScale;
uniform float lightMapScale;
#endif
\ No newline at end of file
......@@ -13,7 +13,7 @@ THREE.UniformsLib = {
"offsetRepeat" : { type: "v4", value: new THREE.Vector4( 0, 0, 1, 1 ) },
"lightMap" : { type: "t", value: null },
"lightScale" : { type: "f", value: 1 },
"lightMapScale" : { type: "f", value: 1 },
"aoMap" : { type: "t", value: null },
"aoScale" : { type: "f", value: 1 },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册