mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 04:56:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			8 lines
		
	
	
	
		
			261 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
	
		
			261 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
#define PARALLAX_SCALE 0.04
 | 
						|
#define PARALLAX_BIAS -0.02
 | 
						|
 | 
						|
vec2 getParallaxOffset(vec3 eyeDir, mat3 tbn, float height)
 | 
						|
{
 | 
						|
    vec3 TSeyeDir = normalize((vec4(normalize(tbn * eyeDir),0)).xyz);
 | 
						|
    return TSeyeDir.xy * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
 | 
						|
}
 |