-
Notifications
You must be signed in to change notification settings - Fork 43
/
passthrough.vsh
51 lines (42 loc) · 1.29 KB
/
passthrough.vsh
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
42
43
44
45
46
47
48
49
50
51
; make sure you update aemstro_as for this (01/01/15)
; setup constants
.const c82, 1.0, 1.0, 1.0, 1.0
.const c83, 0.0, 0.0, 0.0, 0.0
; setup outmap
.out o0, result.position, 0xF
.out o1, result.color, 0xF
.out o2, result.texcoord0, 0x3
.out o3, result.texcoord1, 0x3
; setup uniform map (required to use SHDR_GetUniformRegister)
.uniform c84, c87, projection ; c84-c87 = projection matrix
.uniform c88, c91, modelview ; c88-c91 = modelview matrix
; setup vsh and gsh
.vsh main, endmain
; code
main:
; tempreg = mdlvMtx * in.pos
mov o0, v0 (0x6)
mov o0, c82 (0x3)
; result.texcoord = in.texcoord
mov o2, v1 (0x5)
mov o3, v1 (0x5)
; result.color = EXPERIMENTS !
mov o1, c82 (0x5)
end
nop
endmain:
; operand descriptors
.opdesc x___, xyzw, xyzw ; 0x0
.opdesc _y__, xyzw, xyzw ; 0x1
.opdesc __z_, xyzw, xyzw ; 0x2
.opdesc ___w, xyzw, xyzw ; 0x3
.opdesc xyzw, zzzy, xyzw ; 0x4
.opdesc xyzw, xyzw, xyzw ; 0x5
.opdesc xyz_, xyzw, xyzw ; 0x6
.opdesc xyzw, yyyw, xyzw ; 0x7
.opdesc x___, wwww, xyzw ; 0x8
.opdesc xyzw, xyzw, xxxx, xyzw ; 0x9
.opdesc xyzw, xyzw, -xyzw ; 0xa
.opdesc xyzw, xxxx, wwww ; 0xb
.opdesc xyzw, -xxxx, wwww ; 0xc
.opdesc xy__, yzzz, xyzw ; 0xd