mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 08:56:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			396 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			396 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 120
 | |
| 
 | |
| uniform sampler2D diffuseMap;
 | |
| 
 | |
| varying vec2 diffuseMapUV;
 | |
| varying float alphaPassthrough;
 | |
| 
 | |
| void main()
 | |
| {
 | |
|     float alpha = texture2D(diffuseMap, diffuseMapUV).a * alphaPassthrough;
 | |
| 
 | |
|     const float alphaRef = 0.5;
 | |
| 
 | |
|     if (alpha < alphaRef)
 | |
|         discard;
 | |
| 
 | |
|     // DO NOT write to color!
 | |
|     // This is a post-pass of transparent objects in charge of only updating depth buffer.
 | |
| }
 |