mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 17:49:55 +00:00
24 lines
484 B
GLSL
24 lines
484 B
GLSL
#version 120
|
|
|
|
#if @diffuseMap
|
|
uniform sampler2D diffuseMap;
|
|
varying vec2 diffuseMapUV;
|
|
#endif
|
|
|
|
varying float depth;
|
|
|
|
varying vec3 lighting;
|
|
|
|
void main()
|
|
{
|
|
#if @diffuseMap
|
|
gl_FragData[0] = texture2D(diffuseMap, diffuseMapUV);
|
|
#else
|
|
gl_FragData[0] = vec4(1.0, 1.0, 1.0, 1.0);
|
|
#endif
|
|
|
|
gl_FragData[0].xyz *= lighting;
|
|
|
|
float fogValue = clamp((depth - gl_Fog.start) * gl_Fog.scale, 0.0, 1.0);
|
|
gl_FragData[0].xyz = mix(gl_FragData[0].xyz, gl_Fog.color.xyz, fogValue);
|
|
}
|