Microsoft DirectX 8.0 (Visual Basic) |
The following shader performs per-pixel 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, c0 // Third row of transform. Then reflect // infinite and sample the cube map. mov r0, t3 // Emit to the frame buffer blender. // This adds to the frame buffer contents.