xps.1.1 // The alpha value of the water def c0, 0.0, 0.2, 0.4, 0.60 def c1, 0.6, 0.6, 0.6, 0.45 def c2, 0.0f, 0.21f, 0.1f, 0.0f tex t1 // Reflection Map tex t2 // Scrolling Water texture tex t3 // Scrolling Water texture mul t2, t2, t3 // Modulate the shifting water textures against each other lrp t2, v0, t2, v0 // Lerp between the water color and the ambient color add t2, t2, c2 // Make the water a little greener lrp r0.rgb, c1, t2, t1 // Lerp between the reflection and the water texture +mov r0.a, c0.a /* def c0, 0.0, 0.2, 0.4, 0.60 def c1, 0.6, 0.6, 0.6, 0.45 def c2, 0.0f, 0.21f, 0.1f, 0.0f tex t1 // Reflection Map tex t2 // Scrolling Water texture tex t3 // Scrolling Water texture mul t2, t2, t3 // Modulate the shifting water textures against each other lrp t2, v0, t2, v0 // Lerp between the water color and the ambient color add t2, t1, t2 // Add the reflection map directly to the water texture add t2, t2, c2 // Make the water a little greener dp3 r0, t1, t1 // If there is any color in the reflection map, r0.a will be filled with a value > 0.0f lrp r1.rgb, c1, t1, t2 // Lerp between the reflection and the water texture +add r0.a, r0.a, c1.a // Increase the conditional test value cnd t0.rgb, r0.a, t1, r1 // Basically, if there's anything in the reflection map, take the refmap, otherwise take the lerped value //cnd t0.rgb, r0.a, r1, t2 mov r0.rgb, t0 +mov r0.a, c0.a */ /*mul t2, t2, t3 // Modulate the shifting water textures against each other lrp t2, v0, t2, v0 // Lerp between the water color and the ambient color add t2, t1, t2 dp3 r0, t1, t1 add r0.a, r0.a, c1.a lrp r1, c1, t1, t2 // Lerp between the reflection and the water texture cnd t0, r0.a, t1, r1 mov r0.rgb, t0 +mov r0.a, c0.a*/