mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 09:26:41 +00:00 
			
		
		
		
	Move tangent space generation to the vertex shaders Support diffuse parallax when no normal map is present Don't use diffuse parallax if there's no diffuse map Generalize normal-to-view conversion Rewrite parallax
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			284 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			284 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
#ifndef LIB_MATERIAL_PARALLAX
 | 
						|
#define LIB_MATERIAL_PARALLAX
 | 
						|
 | 
						|
#define PARALLAX_SCALE 0.04
 | 
						|
#define PARALLAX_BIAS -0.02
 | 
						|
 | 
						|
vec2 getParallaxOffset(vec3 eyeDir, float height, float flipY)
 | 
						|
{
 | 
						|
    return vec2(eyeDir.x, eyeDir.y * flipY) * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
 | 
						|
}
 | 
						|
 | 
						|
#endif
 |