Spot light : fixed issue that was preventing point lights to work correctly when a spot light is in the scene
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7916 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
		
							parent
							
								
									1b8e65bc97
								
							
						
					
					
						commit
						ae2fda8626
					
				| @ -742,6 +742,8 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material> | ||||
| 
 | ||||
|                     tmpLightPosition.set(dir.getX(), dir.getY(), dir.getZ(), -1); | ||||
|                     lightPos.setValue(VarType.Vector4, tmpLightPosition); | ||||
|                     tmpLightDirection.set(0,0,0,0); | ||||
|                     lightDir.setValue(VarType.Vector4, tmpLightDirection); | ||||
|                     break; | ||||
|                 case Point: | ||||
|                     PointLight pl = (PointLight) l; | ||||
| @ -750,6 +752,8 @@ public class Material implements Asset, Cloneable, Savable, Comparable<Material> | ||||
| 
 | ||||
|                     tmpLightPosition.set(pos.getX(), pos.getY(), pos.getZ(), invRadius); | ||||
|                     lightPos.setValue(VarType.Vector4, tmpLightPosition); | ||||
|                     tmpLightDirection.set(0,0,0,0); | ||||
|                     lightDir.setValue(VarType.Vector4, tmpLightDirection); | ||||
|                     break; | ||||
|                 case Spot: | ||||
|                     SpotLight sl = (SpotLight) l; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user