diff options
author | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-28 22:28:34 +1000 |
commit | 7028cbe09c688437910a25623098762bf0fa592d (patch) | |
tree | 10b5af58277d9880380c2251f109325542c4e6eb /libraries/irrlicht-1.8.1/media/opengl.vert | |
parent | Move lemon to the src/others directory. (diff) | |
download | SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.zip SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.gz SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.bz2 SledjHamr-7028cbe09c688437910a25623098762bf0fa592d.tar.xz |
Move Irrlicht to src/others.
Diffstat (limited to 'libraries/irrlicht-1.8.1/media/opengl.vert')
-rw-r--r-- | libraries/irrlicht-1.8.1/media/opengl.vert | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/libraries/irrlicht-1.8.1/media/opengl.vert b/libraries/irrlicht-1.8.1/media/opengl.vert deleted file mode 100644 index bfee816..0000000 --- a/libraries/irrlicht-1.8.1/media/opengl.vert +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | |||
2 | uniform mat4 mWorldViewProj; | ||
3 | uniform mat4 mInvWorld; | ||
4 | uniform mat4 mTransWorld; | ||
5 | uniform vec3 mLightPos; | ||
6 | uniform vec4 mLightColor; | ||
7 | |||
8 | void main(void) | ||
9 | { | ||
10 | gl_Position = mWorldViewProj * gl_Vertex; | ||
11 | |||
12 | vec4 normal = vec4(gl_Normal, 0.0); | ||
13 | normal = mInvWorld * normal; | ||
14 | normal = normalize(normal); | ||
15 | |||
16 | vec4 worldpos = gl_Vertex * mTransWorld; | ||
17 | |||
18 | vec4 lightVector = worldpos - vec4(mLightPos,1.0); | ||
19 | lightVector = normalize(lightVector); | ||
20 | |||
21 | float tmp2 = dot(-lightVector, normal); | ||
22 | |||
23 | vec4 tmp = mLightColor * tmp2; | ||
24 | gl_FrontColor = gl_BackColor = vec4(tmp.x, tmp.y, tmp.z, 0.0); | ||
25 | |||
26 | gl_TexCoord[0] = gl_MultiTexCoord0; | ||
27 | } | ||