mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-12 22:06:00 -04:00
13 lines
264 B
GLSL
13 lines
264 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)
|
|
{
|
|
return vec2(eyeDir.x, -eyeDir.y) * ( height * PARALLAX_SCALE + PARALLAX_BIAS );
|
|
}
|
|
|
|
#endif
|