mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 14:26:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			No EOL
		
	
	
		
			168 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			No EOL
		
	
	
		
			168 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #if @reverseZ
 | |
| uniform float linearFac;
 | |
| #endif
 | |
| 
 | |
| float getLinearDepth(in float z, in float viewZ)
 | |
| {
 | |
| #if @reverseZ
 | |
|     return linearFac*viewZ;
 | |
| #else
 | |
|     return z;
 | |
| #endif
 | |
| } |