ps_1_1 // Declare, PS v1.1 def c3, 0, 1, 0, 0 // Dot product to extract red component tex t0 // Look up the base texture #0 from the base (scaled) coordinates tex t1 // Look up the base texture #1 from the base (scaled) coordinates tex t2 // Look up the base texture #2 from the base (scaled) coordinates mul r0.rgb, t0, v0.a // Multiply the base texture #0 by its alpha value mad r0.rgb, t1, v1.a, r0 // Mulitply the base texture #1 by its alpha value, and add to previous result dp3 r1, c3, v1 // Extract the alpha for texture #2. mad r0.rgb, t2, r1, r0 // Mulitply the base texture #2 by its alpha value, and add to t#0's alpha'd value mul r0.rgb, r0, v0 // Multiply the alpha'd base texture by the diffuse color +mov r0.a, r1.b // Move the total alpha into the final alpha // Instructions : 4 texture, 6 arithmetic = 10