Skip to content

Commit 9837e92

Browse files
committed
Removed AOmap and Lightmap from Basic and Lambert
1 parent 1f1d418 commit 9837e92

8 files changed

Lines changed: 22 additions & 42 deletions

File tree

docs/api/materials/MeshBasicMaterial.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ <h3>[name]( [page:Object parameters] )</h3>
2525
<div>
2626
color — geometry color in hexadecimal. Default is 0xffffff.<br />
2727
map — Sets the texture map. Default is null <br />
28-
lightMap — Set light map. Default is null.<br />
2928
specularMap — Set specular map. Default is null.<br />
3029
alphaMap — Set alpha map. Default is null.<br />
3130
envMap — Set env map. Default is null.<br />
@@ -45,9 +44,6 @@ <h2>Properties</h2>
4544
<h3>[property:Integer color]</h3>
4645
<div>Sets the color of the geometry. Default is 0xffffff.</div>
4746

48-
<h3>[property:Texture lightMap]</h3>
49-
<div>Set light map. Default is null.</div>
50-
5147
<h3>[property:Texture specularMap]</h3>
5248
<div>Set specular map. Default is null.</div>
5349

docs/api/materials/MeshLambertMaterial.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ <h3>[name]([page:Object parameters])</h3>
2525
<div>
2626
color — Line color in hexadecimal. Default is 0xffffff.<br />
2727
map — Sets the texture map. Default is null <br />
28-
lightMap — Set light map. Default is null.<br />
2928
specularMap — Set specular map. Default is null.<br />
3029
alphaMap — Set alpha map. Default is null.<br />
3130
envMap — Set env map. Default is null.<br />
@@ -57,9 +56,6 @@ <h3>[property:Color emissive]</h3>
5756
<h3>[property:Texture map]</h3>
5857
<div>Set color texture map. Default is null.</div>
5958

60-
<h3>[property:Texture lightMap]</h3>
61-
<div>Set light map. Default is null.</div>
62-
6359
<h3>[property:Texture specularMap]</h3>
6460
<div>Since this material does not have a specular component, the specular value affects only how much of the environment map affects the surface. Default is null.</div>
6561

docs/scenes/js/material.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ function guiMeshBasicMaterial ( gui, mesh, material, geometry ) {
324324
color : material.color.getHex(),
325325
envMaps : envMapKeys,
326326
map : textureMapKeys,
327-
lightMap : textureMapKeys,
328327
specularMap : textureMapKeys,
329328
alphaMap : textureMapKeys
330329
};
@@ -340,7 +339,6 @@ function guiMeshBasicMaterial ( gui, mesh, material, geometry ) {
340339

341340
folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
342341
folder.add( data, 'map', textureMapKeys ).onChange( updateTexture( material, 'map', textureMaps ) );
343-
folder.add( data, 'lightMap', textureMapKeys ).onChange( updateTexture( material, 'lightMap', textureMaps ) );
344342
folder.add( data, 'specularMap', textureMapKeys ).onChange( updateTexture( material, 'specularMap', textureMaps ) );
345343
folder.add( data, 'alphaMap', textureMapKeys ).onChange( updateTexture( material, 'alphaMap', textureMaps ) );
346344
folder.add( material, 'morphTargets' ).onChange( updateMorphs( mesh, material ) );
@@ -395,7 +393,6 @@ function guiMeshLambertMaterial ( gui, mesh, material, geometry ) {
395393
emissive : material.emissive.getHex(),
396394
envMaps : envMapKeys,
397395
map : textureMapKeys,
398-
lightMap : textureMapKeys,
399396
specularMap : textureMapKeys,
400397
alphaMap : textureMapKeys
401398
};
@@ -415,7 +412,6 @@ function guiMeshLambertMaterial ( gui, mesh, material, geometry ) {
415412

416413
folder.add( data, 'envMaps', envMapKeys ).onChange( updateTexture( material, 'envMap', envMaps ) );
417414
folder.add( data, 'map', textureMapKeys ).onChange( updateTexture( material, 'map', textureMaps ) );
418-
folder.add( data, 'lightMap', textureMapKeys ).onChange( updateTexture( material, 'lightMap', textureMaps ) );
419415
folder.add( data, 'specularMap', textureMapKeys ).onChange( updateTexture( material, 'specularMap', textureMaps ) );
420416
folder.add( data, 'alphaMap', textureMapKeys ).onChange( updateTexture( material, 'alphaMap', textureMaps ) );
421417
folder.add( material, 'morphTargets' ).onChange( updateMorphs( mesh, material ) );

src/materials/MeshBasicMaterial.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
* opacity: <float>,
88
* map: new THREE.Texture( <Image> ),
99
*
10-
* lightMap: new THREE.Texture( <Image> ),
11-
*
1210
* specularMap: new THREE.Texture( <Image> ),
1311
*
1412
* alphaMap: new THREE.Texture( <Image> ),
@@ -45,8 +43,6 @@ THREE.MeshBasicMaterial = function ( parameters ) {
4543

4644
this.map = null;
4745

48-
this.lightMap = null;
49-
5046
this.specularMap = null;
5147

5248
this.alphaMap = null;
@@ -87,8 +83,6 @@ THREE.MeshBasicMaterial.prototype.clone = function () {
8783

8884
material.map = this.map;
8985

90-
material.lightMap = this.lightMap;
91-
9286
material.specularMap = this.specularMap;
9387

9488
material.alphaMap = this.alphaMap;

src/materials/MeshLambertMaterial.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
*
1010
* map: new THREE.Texture( <Image> ),
1111
*
12-
* lightMap: new THREE.Texture( <Image> ),
13-
*
1412
* specularMap: new THREE.Texture( <Image> ),
1513
*
1614
* alphaMap: new THREE.Texture( <Image> ),
@@ -49,8 +47,6 @@ THREE.MeshLambertMaterial = function ( parameters ) {
4947

5048
this.map = null;
5149

52-
this.lightMap = null;
53-
5450
this.specularMap = null;
5551

5652
this.alphaMap = null;
@@ -93,8 +89,6 @@ THREE.MeshLambertMaterial.prototype.clone = function () {
9389

9490
material.map = this.map;
9591

96-
material.lightMap = this.lightMap;
97-
9892
material.specularMap = this.specularMap;
9993

10094
material.alphaMap = this.alphaMap;

src/renderers/WebGLRenderer.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,10 +2443,6 @@ THREE.WebGLRenderer = function ( parameters ) {
24432443
uniforms.diffuse.value = material.color;
24442444

24452445
uniforms.map.value = material.map;
2446-
uniforms.lightMap.value = material.lightMap;
2447-
uniforms.lightMapIntensity.value = material.lightMapIntensity;
2448-
uniforms.aoMap.value = material.aoMap;
2449-
uniforms.aoMapIntensity.value = material.aoMapIntensity;
24502446
uniforms.specularMap.value = material.specularMap;
24512447
uniforms.alphaMap.value = material.alphaMap;
24522448

@@ -2571,6 +2567,12 @@ THREE.WebGLRenderer = function ( parameters ) {
25712567
uniforms.emissive.value = material.emissive;
25722568
uniforms.specular.value = material.specular;
25732569

2570+
uniforms.lightMap.value = material.lightMap;
2571+
uniforms.lightMapIntensity.value = material.lightMapIntensity;
2572+
2573+
uniforms.aoMap.value = material.aoMap;
2574+
uniforms.aoMapIntensity.value = material.aoMapIntensity;
2575+
25742576
}
25752577

25762578
function refreshUniformsLambert ( uniforms, material ) {

src/renderers/shaders/ShaderLib.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ THREE.ShaderLib = {
7070
THREE.ShaderChunk[ "uv2_pars_fragment" ],
7171
THREE.ShaderChunk[ "map_pars_fragment" ],
7272
THREE.ShaderChunk[ "alphamap_pars_fragment" ],
73-
THREE.ShaderChunk[ "aomap_pars_fragment" ],
74-
THREE.ShaderChunk[ "lightmap_pars_fragment" ],
7573
THREE.ShaderChunk[ "envmap_pars_fragment" ],
7674
THREE.ShaderChunk[ "fog_pars_fragment" ],
7775
THREE.ShaderChunk[ "shadowmap_pars_fragment" ],
@@ -92,8 +90,6 @@ THREE.ShaderLib = {
9290

9391
" outgoingLight = diffuseColor.rgb;", // simple shader
9492

95-
THREE.ShaderChunk[ "aomap_fragment" ],
96-
THREE.ShaderChunk[ "lightmap_fragment" ],
9793
THREE.ShaderChunk[ "envmap_fragment" ],
9894
THREE.ShaderChunk[ "shadowmap_fragment" ], // TODO: Shadows on an otherwise unlit surface doesn't make sense.
9995

@@ -192,8 +188,6 @@ THREE.ShaderLib = {
192188
THREE.ShaderChunk[ "uv2_pars_fragment" ],
193189
THREE.ShaderChunk[ "map_pars_fragment" ],
194190
THREE.ShaderChunk[ "alphamap_pars_fragment" ],
195-
THREE.ShaderChunk[ "aomap_pars_fragment" ],
196-
THREE.ShaderChunk[ "lightmap_pars_fragment" ],
197191
THREE.ShaderChunk[ "envmap_pars_fragment" ],
198192
THREE.ShaderChunk[ "fog_pars_fragment" ],
199193
THREE.ShaderChunk[ "shadowmap_pars_fragment" ],
@@ -228,8 +222,6 @@ THREE.ShaderLib = {
228222

229223
" #endif",
230224

231-
THREE.ShaderChunk[ "aomap_fragment" ],
232-
THREE.ShaderChunk[ "lightmap_fragment" ],
233225
THREE.ShaderChunk[ "envmap_fragment" ],
234226
THREE.ShaderChunk[ "shadowmap_fragment" ],
235227

@@ -250,6 +242,8 @@ THREE.ShaderLib = {
250242
uniforms: THREE.UniformsUtils.merge( [
251243

252244
THREE.UniformsLib[ "common" ],
245+
THREE.UniformsLib[ "aomap" ],
246+
THREE.UniformsLib[ "lightmap" ],
253247
THREE.UniformsLib[ "bump" ],
254248
THREE.UniformsLib[ "normalmap" ],
255249
THREE.UniformsLib[ "fog" ],

src/renderers/shaders/UniformsLib.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ THREE.UniformsLib = {
1212
"map" : { type: "t", value: null },
1313
"offsetRepeat" : { type: "v4", value: new THREE.Vector4( 0, 0, 1, 1 ) },
1414

15-
"lightMap" : { type: "t", value: null },
16-
"lightMapIntensity" : { type: "f", value: 1 },
17-
18-
"aoMap" : { type: "t", value: null },
19-
"aoMapIntensity" : { type: "f", value: 1 },
20-
2115
"specularMap" : { type: "t", value: null },
2216
"alphaMap" : { type: "t", value: null },
2317

@@ -30,6 +24,20 @@ THREE.UniformsLib = {
3024

3125
},
3226

27+
aomap: {
28+
29+
"aoMap" : { type: "t", value: null },
30+
"aoMapIntensity" : { type: "f", value: 1 },
31+
32+
},
33+
34+
lightmap: {
35+
36+
"lightMap" : { type: "t", value: null },
37+
"lightMapIntensity" : { type: "f", value: 1 },
38+
39+
},
40+
3341
bump: {
3442

3543
"bumpMap" : { type: "t", value: null },

0 commit comments

Comments
 (0)