mirror of
				https://github.com/HandmadeMath/HandmadeMath.git
				synced 2025-11-04 01:34:29 +00:00 
			
		
		
		
	Fixed Perspective
This commit is contained in:
		@@ -721,6 +721,8 @@ Perspective(float FOV, float AspectRatio, float Near, float Far)
 | 
				
			|||||||
    Result.Elements[0][0] = (float)Cotangent / AspectRatio;
 | 
					    Result.Elements[0][0] = (float)Cotangent / AspectRatio;
 | 
				
			||||||
    Result.Elements[1][1] = (float)Cotangent;
 | 
					    Result.Elements[1][1] = (float)Cotangent;
 | 
				
			||||||
    Result.Elements[2][2] = (float)(-(Far + Near) / DeltaZ);
 | 
					    Result.Elements[2][2] = (float)(-(Far + Near) / DeltaZ);
 | 
				
			||||||
 | 
					    Result.Elements[2][3] = (float)-1;
 | 
				
			||||||
 | 
					    Result.Elements[3][2] = (float)(-2 * Near * Far / DeltaZ);
 | 
				
			||||||
    Result.Elements[3][3] = 0;
 | 
					    Result.Elements[3][3] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return(Result);
 | 
					    return(Result);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user