mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-03 23:56:47 +00:00 
			
		
		
		
	small corrections
This commit is contained in:
		
							parent
							
								
									9ab3a0c44b
								
							
						
					
					
						commit
						497b33e403
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -713,16 +713,16 @@ namespace MWRender
 | 
			
		|||
 | 
			
		||||
        osg::Vec4 getColorByDirection(osg::Vec3d d)
 | 
			
		||||
        {
 | 
			
		||||
            // for details see OpenGL 4.4 specification page 241
 | 
			
		||||
            // for details see OpenGL 4.4 specification page 225
 | 
			
		||||
 | 
			
		||||
            double x, y;
 | 
			
		||||
            double ma;  
 | 
			
		||||
            int side;
 | 
			
		||||
 | 
			
		||||
            double ax, ay, az;
 | 
			
		||||
            ax = d.x() > 0 ? d.x() : -d.x();   // abs behaves weirdly for some reason
 | 
			
		||||
            ay = d.y() > 0 ? d.y() : -d.y();
 | 
			
		||||
            az = d.z() > 0 ? d.z() : -d.z();
 | 
			
		||||
            ax = fabs(d.x());
 | 
			
		||||
            ay = fabs(d.y());
 | 
			
		||||
            az = fabs(d.z());
 | 
			
		||||
 | 
			
		||||
            if (ax > ay)
 | 
			
		||||
                if (ax > az)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue