tests/2.vsh
author icculus
Sat, 09 Feb 2008 18:39:45 -0500
branchtrunk
changeset 3 81ecad4e148d
child 23 8a6ac66b0761
permissions -rw-r--r--
[svn] Test cases...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     1
vs.2.0
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     2
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     3
//------------------------------------------------------------------------------
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     4
// Simple Vertex Shader
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     5
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     6
//  Constants Registers:
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     7
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     8
//    c0-c3 = combined model-view-projection matrix
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
     9
//    c4    = constant color (defined by the application)
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    10
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    11
//  Input Registers:
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    12
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    13
//    v0    = per-vertex position
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    14
//    v1    = per-vertex color
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    15
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    16
//  Output Registers:
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    17
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    18
//    oPos  = homogeneous position
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    19
//    oD0   = diffuse color
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    20
//
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    21
//------------------------------------------------------------------------------
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    22
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    23
dcl_position v0
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    24
dcl_color    v1
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    25
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    26
m4x4 oPos, v0, c0   // Transform the per-vertex position into clip-space
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    27
mov oD0, v1         // Use the original per-vertex color specified
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    28
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    29
//mov oD0, c4         // Uncomment this to use the constant color stored at c4
81ecad4e148d [svn] Test cases...
icculus
parents:
diff changeset
    30