Skip to content

An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.

C++
428 B
Raw Blame
#version 120

#include "vertexcolors.glsl"

varying vec3 vertexNormal;

uniform bool useAdvancedShader = false;

void main()
{
    vec3 lightDir = normalize(vec3(-1., -0.5, -2.));

    float lightAttenuation = dot(-lightDir, vertexNormal) * 0.5 + 0.5;

    if(!useAdvancedShader)
    {
        gl_FragData[0] = getDiffuseColor();
    }
    else
    {
        gl_FragData[0] = vec4(passColor.xyz * lightAttenuation, 1.);
    }
}