// This pixel shader is used when rendering fire with texture perturbation
ps.1.4

// Retrieve the texture coordinate of the diffuse map
texcrd r0.xyz, t0
// Retrieve the data from the distortion maps
texld r1, t1
texld r2, t2
texld r3, t3

// Distort the diffuse map three times
mad r1.xyz, r1_bias, c0.x, r0
mad r1.xyz, r2_bias, c0.y, r1
mad r1.xyz, r3_bias, c0.z, r1

phase

// Look up the texel color at the calculated position and use it
texld r0, r1.xyz
