mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 10:56:38 +00:00 
			
		
		
		
	remove debug draw shader, now that debug and debugdraw serve the same function remove debug draw code from actors to clean replaced int uniforms with bool for better readability clang format cleanup, remove unused func, and mistake whitespace fix namespace added more colors fixed missing whitespace
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			428 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			428 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 120
 | |
| 
 | |
| #include "vertexcolors.glsl"
 | |
| 
 | |
| varying vec3 vertexNormal;
 | |
| 
 | |
| uniform bool useAdvancedShader = false;
 | |
| 
 | |
| void main()
 | |
| {
 | |
|     vec3 lightDir = normalize(vec3(-1., -0.5, -2.));
 | |
| 
 | |
|     float lightAttenuation = dot(-lightDir, vertexNormal) * 0.5 + 0.5;
 | |
| 
 | |
|     if(!useAdvancedShader)
 | |
|     {
 | |
|         gl_FragData[0] = getDiffuseColor();
 | |
|     }
 | |
|     else
 | |
|     {
 | |
|         gl_FragData[0] = vec4(passColor.xyz * lightAttenuation, 1.);
 | |
|     }
 | |
| }
 |