// Vertex shader for shadows maps

// c0..3	- WVP
// c4..7	- world to light proj x-form
// c8..11	- shadow projection for sample 1
// c12..15	- shadow projection for sample 2
// c16..19	- shadow projection for sample 3
// c20..23	- shadow projection for sample 4
// c30		- light direction
// c31		- diffuse light
// c32		- Z-bias

vs.1.0
// Transform vertex position
m4x4 oPos, v0, c0
// Compute texture coordinates for 4 shadow samples
m4x4 oT0, v0, c8
m4x4 oT1, v0, c12
m4x4 oT2, v0, c16
m4x4 oT3, v0, c20
// Diffuse lighting
dp3 r0, v3, c30
// Multiply by light color
mul oD0, r0, c31
// Transform Z into projected light space
m4x4 r1, v0, c4
// Add Z-bias
add oT4, r1, c32.x
;mov oT4,r1
