aboutsummaryrefslogtreecommitdiff
path: root/libs/preview_nif/data/shaders/sk_msn.vert
blob: 755605f679d02fd41d1752106fe61281ca493444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#version 120

uniform mat4 modelViewMatrix;
uniform mat4 mvpMatrix;
uniform mat3 normalMatrix;
uniform vec3 lightDirection;
uniform vec4 ambientColor;
uniform vec4 diffuseColor;

attribute vec3 position;
attribute vec3 normal;
attribute vec3 tangent;
attribute vec3 bitangent;
attribute vec2 texCoord;
attribute vec4 color;

varying vec2 TexCoord;
varying vec3 LightDir;
varying vec3 ViewDir;

varying vec3 v;

varying vec4 A;
varying vec4 C;
varying vec4 D;


void main( void )
{
    gl_Position = mvpMatrix * vec4(position, 1);
    TexCoord = texCoord;

    v = vec3(modelViewMatrix * vec4(position, 1));

    ViewDir = -v.xyz;
    LightDir = lightDirection;

    A = ambientColor;
    C = color;
    D = diffuseColor;
}