From Ohm

Default Programmable Pipeline

The standard vertex and pixel shader that are equivalent to the fixed function pipeline:

Vertex program (long/short version):

!!ARBvp1.0                          !!ARBvp1.0
PARAM mat[4]={state.matrix.mvp};    OPTION ARB_position_invariant;
TEMP vtx,col,pos;                   MOV result.color,vertex.color;
### fetch actual vertex             END
MOV vtx,vertex.position;
MOV col,vertex.color;
### transform vertex with modelview
DP4 pos.x,mat[0],vtx;
DP4 pos.y,mat[1],vtx;
DP4 pos.z,mat[2],vtx;
DP4 pos.w,mat[3],vtx;
### write resulting vertex
MOV result.position,pos;
MOV result.color,col;

Fragment program:

MOV result.color,fragment.color;

Vertex and fragment program opcodes are described here [1].



Retrieved from

Page last modified on November 25, 2013, at 01:00 PM