mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-24 22:26:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			268 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			268 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #ifndef LIB_PARTICLE_OCCLUSION
 | |
| #define LIB_PARTICLE_OCCLUSION
 | |
| 
 | |
| void applyOcclusionDiscard(in vec3 coord, float sceneDepth)
 | |
| {
 | |
| #if @reverseZ
 | |
|     if (coord.z < sceneDepth)
 | |
|         discard;
 | |
| #else
 | |
|     if (coord.z * 0.5 + 0.5 > sceneDepth)
 | |
|         discard;
 | |
| #endif
 | |
| }
 | |
| 
 | |
| #endif
 |