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/d3d8.vsh | |
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/d3d8.vsh')
-rw-r--r-- | libraries/irrlicht-1.8.1/media/d3d8.vsh | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/libraries/irrlicht-1.8.1/media/d3d8.vsh b/libraries/irrlicht-1.8.1/media/d3d8.vsh deleted file mode 100644 index e0c24f7..0000000 --- a/libraries/irrlicht-1.8.1/media/d3d8.vsh +++ /dev/null | |||
@@ -1,37 +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 | |||
6 | vs.1.1 | ||
7 | |||
8 | ; transpose and transform position to clip space | ||
9 | mul r0, v0.x, c4 | ||
10 | mad r0, v0.y, c5, r0 | ||
11 | mad r0, v0.z, c6, r0 | ||
12 | add oPos, c7, r0 | ||
13 | |||
14 | ; transform normal | ||
15 | dp3 r1.x, v1, c0 | ||
16 | dp3 r1.y, v1, c1 | ||
17 | dp3 r1.z, v1, c2 | ||
18 | |||
19 | ; renormalize normal | ||
20 | dp3 r1.w, r1, r1 | ||
21 | rsq r1.w, r1.w | ||
22 | mul r1, r1, r1.w | ||
23 | |||
24 | ; calculate light vector | ||
25 | m4x4 r6, v0, c10 ; vertex into world position | ||
26 | add r2, c8, -r6 ; vtxpos - lightpos | ||
27 | |||
28 | ; normalize light vector | ||
29 | dp3 r2.w, r2, r2 | ||
30 | rsq r2.w, r2.w | ||
31 | mul r2, r2, r2.w | ||
32 | |||
33 | ; calculate light color | ||
34 | dp3 r3, r1, r2 ; dp3 with negative light vector | ||
35 | lit r5, r3 ; clamp to zero if r3 < 0, r5 has diffuce component in r5.y | ||
36 | mul oD0, r5.y, c9 ; ouput diffuse color | ||
37 | mov oT0, v3 ; store texture coordinates | ||