File: vertex.arb

package info (click to toggle)
libopengl-perl 0.7000%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,308 kB
  • sloc: perl: 10,178; ansic: 8,576; makefile: 113
file content (26 lines) | stat: -rwxr-xr-x 778 bytes parent folder | download | duplicates (6)
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
!!ARBvp1.0
PARAM center = program.local[0];
PARAM xform[4] = {program.local[1..4]};
TEMP vertexClip;

# ModelView projection
DP4 vertexClip.x, state.matrix.mvp.row[0], vertex.position;
DP4 vertexClip.y, state.matrix.mvp.row[1], vertex.position;
DP4 vertexClip.z, state.matrix.mvp.row[2], vertex.position;
DP4 vertexClip.w, state.matrix.mvp.row[3], vertex.position;

# Additional transform, via matrix variable
DP4 vertexClip.x, vertexClip, xform[0];
DP4 vertexClip.y, vertexClip, xform[1];
DP4 vertexClip.z, vertexClip, xform[2];
DP4 vertexClip.w, vertexClip, xform[3];

#SUB result.position, vertexClip, center;
MOV result.position, vertexClip;

# Pass through color
MOV result.color, vertex.color;

# Pass through texcoords
SUB result.texcoord[0], vertex.texcoord, center;
END