vs_1_1 dcl_position v0 def c12, 1.0, 0.0, 0.002, 3.0 // Universal 1, Universal 0, rcp Complete fade depth, ambient color scaling mov r0.w, c12.x // 1 // w = 1. m4x3 r0.xyz, v0, c4 // 3 // Transform the position into world space mov r0.w, c12.x // 1 // w = 1. m4x4 oPos, r0, c0 // 4 // Transform the vertex into screen space sge r1, c12.y, r0.z // 1 // if r0.z is less than than zero, r1 = 1, else r1 = 0 mul r2, -r0.z, c12.z // 1 // Scale the depth my the maximum scale depth mul oD0, r2, r1 // 1 // Save the scaled world depth (zero if above zero) mul oD1, c11, c12.w // 1 // Save the ambient color // Total Instructions = 13