diff options
Diffstat (limited to 'mp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh')
| -rw-r--r-- | mp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/mp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh b/mp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh index bd491d58..a1b52625 100644 --- a/mp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh +++ b/mp/src/materialsystem/stdshaders/WaterCheapOpaque_ps14.psh @@ -1,31 +1,31 @@ -ps.1.4
-
-; Get the 3-vector from the normal map
-texld r0, t0
-; Get environment matrix
-texcrd r1.rgb, t1
-texcrd r2.rgb, t2
-texcrd r3.rgb, t3
-; Normalize eye-ray vector through normalizer cube map
-texld r4, t4 ; <---- CUBE MAP here!!!
-
-; Transform normal
-dp3 r5.r, r1, r0_bx2
-dp3 r5.g, r2, r0_bx2
-dp3 r5.b, r3, r0_bx2
-; Reflection calculatiom
-dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye)
-mul r3.rgb, r5, r3 ; 2N(N.Eye)
-dp3 r2.rgb, r5, r5 ; N.N
-mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N)
-
-phase
-
-; Sample environment map
-texld r3, r2
-
-; multiply color by reflecttint
-mul r0, r3, c1
-
-; blend between reflected color and fog color based on constant factor
-lrp r0.rgb, c1.a, r0, c0
+ps.1.4 + +; Get the 3-vector from the normal map +texld r0, t0 +; Get environment matrix +texcrd r1.rgb, t1 +texcrd r2.rgb, t2 +texcrd r3.rgb, t3 +; Normalize eye-ray vector through normalizer cube map +texld r4, t4 ; <---- CUBE MAP here!!! + +; Transform normal +dp3 r5.r, r1, r0_bx2 +dp3 r5.g, r2, r0_bx2 +dp3 r5.b, r3, r0_bx2 +; Reflection calculatiom +dp3_x2 r3.rgb, r5, r4_bx2 ; 2(N.Eye) +mul r3.rgb, r5, r3 ; 2N(N.Eye) +dp3 r2.rgb, r5, r5 ; N.N +mad r2.rgb, -r4_bx2, r2, r3 ; 2N(N.Eye) - Eye(N.N) + +phase + +; Sample environment map +texld r3, r2 + +; multiply color by reflecttint +mul r0, r3, c1 + +; blend between reflected color and fog color based on constant factor +lrp r0.rgb, c1.a, r0, c0 |