You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/files/data/shaders/internal_distortion.omwfx

26 lines
653 B
Plaintext

fragment main {
omw_In vec2 omw_TexCoord;
void main()
{
const float multiplier = 0.14;
vec2 offset = omw_Texture2D(omw_SamplerDistortion, omw_TexCoord).rg;
offset *= multiplier;
offset = clamp(offset, vec2(-1.0), vec2(1.0));
float occlusionFactor = omw_Texture2D(omw_SamplerDistortion, omw_TexCoord+offset).b;
omw_FragColor = mix(omw_GetLastShader(omw_TexCoord + offset), omw_GetLastShader(omw_TexCoord), occlusionFactor);
}
}
technique {
description = "Internal refraction shader for OpenMW";
version = "1.0";
author = "OpenMW";
passes = main;
flags = hidden;
}