;---------------------------------------------------------------------------- ; VertexShader Version ; MUST BE 1.1 - since we use the a0 register! vs.1.1 ;---------------------------------------------------------------------------- ; ; Constants specified by the app ; c0 = constants0 ( 1.0f,-1.0f, 0.0f, 1020.01f); ; c1 = temp ; c2 = // Object Color ; c3 = // Line Color ; c4 = // Line Size ; c5 = light direction ; c10 = model * matView * matProj ; ; Vertex components (as specified in the vertex DECL) ; v0 = pVertex[i].position ; v3 = pVertex[i].normal ; v5 = pVertex[i].texturecoords0 ; dcl_position v0 ; dcl_normal v3 ; dcl_texcoord0 v7 ; dcl_tangent v8 ; dcl_binormal v9 ; dcl_normal1 v10 ; ;---------------------------------------------------------------------------- dcl_position v0 dcl_normal v3 dcl_texcoord0 v5 ;---------------------------------------------------------------------------- ; Transform the resulting position for the world ;---------------------------------------------------------------------------- mul r4, v3.xyz, c4.xxx add r4, r4, v0.xyz mov r4.w, c0.x m4x4 oPos, r4, c10 ;---------------------------------------------------------------------------- ; Lighting based on a SINGLE LIGHT!!!! ;---------------------------------------------------------------------------- mov oD0.xyzw, c3 ; Output color ;---------------------------------------------------------------------------- ; Just pass texture coordinates through ;---------------------------------------------------------------------------- mov oT0.xy, v5.xy mov oT1.xy, v5.xy