ps_1_1 // Declare, PS v1.1 def c2, 0, 1, 0, 0 // Dot product to extract green component def c3, 1, 0, 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 tex t3 // Look up the base texture #3 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, v1, c2 // Extract the green component (alpha #2) from the color register (#1) mad r0.rgb, t2, r1, r0 // Mulitply the base texture #2 by its alpha value, and add to t#0's alpha'd value dp3 r1, v1, c3 // Extract the red component (alpha #3) from the color register (#1) mad r0.rgb, t3, r1, r0 // Mulitply the base texture #3 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, v1.b // Move the total alpha into the final alpha // Instructions : 4 texture, 7 arithmetic = 11