MedicalVisualization
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; END
Fragment program:
!!ARBfp1.0 MOV result.color,fragment.color; END
Vertex and fragment program opcodes are described here.