aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/media/d3d9.vsh
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-01-13 19:47:58 +1000
committerDavid Walter Seikel2014-01-13 19:47:58 +1000
commitf9158592e1478b2013afc7041d9ed041cf2d2f4a (patch)
treeb16e389d7988700e21b4c9741044cefa536dcbae /libraries/irrlicht-1.8/media/d3d9.vsh
parentLibraries readme updated with change markers and more of the Irrlicht changes. (diff)
downloadSledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.zip
SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.gz
SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.bz2
SledjHamr-f9158592e1478b2013afc7041d9ed041cf2d2f4a.tar.xz
Update Irrlicht to 1.8.1. Include actual change markers this time. lol
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/media/d3d9.vsh42
1 files changed, 0 insertions, 42 deletions
diff --git a/libraries/irrlicht-1.8/media/d3d9.vsh b/libraries/irrlicht-1.8/media/d3d9.vsh
deleted file mode 100644
index c1a4fbe..0000000
--- a/libraries/irrlicht-1.8/media/d3d9.vsh
+++ /dev/null
@@ -1,42 +0,0 @@
1; part of the Irrlicht Engine Shader example.
2; This Direct3D9 vertex shader will be loaded by the engine.
3; Please note that these example shaders don't do anything really useful.
4; They only demonstrate that shaders can be used in Irrlicht.
5
6vs.1.1
7
8dcl_position v0; ; declare position
9dcl_normal v1; ; declare normal
10dcl_color v2; ; declare color
11dcl_texcoord0 v3; ; declare texture coordinate
12
13; transpose and transform position to clip space
14mul r0, v0.x, c4
15mad r0, v0.y, c5, r0
16mad r0, v0.z, c6, r0
17add oPos, c7, r0
18
19; transform normal
20dp3 r1.x, v1, c0
21dp3 r1.y, v1, c1
22dp3 r1.z, v1, c2
23
24; renormalize normal
25dp3 r1.w, r1, r1
26rsq r1.w, r1.w
27mul r1, r1, r1.w
28
29; calculate light vector
30m4x4 r6, v0, c10 ; vertex into world position
31add r2, c8, -r6 ; vtxpos - lightpos
32
33; normalize light vector
34dp3 r2.w, r2, r2
35rsq r2.w, r2.w
36mul r2, r2, r2.w
37
38; calculate light color
39dp3 r3, r1, r2 ; dp3 with negative light vector
40lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y
41mul oD0, r5.y, c9 ; ouput diffuse color
42mov oT0, v3 ; store texture coordinates \ No newline at end of file