Microsoft DirectX 8.0 (Visual Basic) |
The following combination shader performs per-pixel diffuse lighting and specular mapping.
ps.1.0 // DirectX8 Version. tex t0 // Declare the n-map. texm3x3pad t1, t0 // First row of transform. texm3x3pad t2, t0 // Second row of transform. texm3x3spec t3, t0 // Third row of transform. Sample diffuse cube // map to t2 and specular cube map into t3. mov r0, t3 // Output the specular color.