home *** CD-ROM | disk | FTP | other *** search
- regc(0, "TFACTOR")
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %daycolor_a )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
- pshader("
-
- ;#include <consts.psh>
-
- ps_2_0
-
- def c4, 20, 1, 0.0, 0.0
- ;def c5, DAYCOLOR
- ;def c7, AMBIENT
-
- dcl t0.xyzw ; reflection texgen
- dcl t1.xy ; noise1 uv coords
- dcl t2.xy ; noise2 uv coords
- dcl t3.xy ; terrain colormap & lightmap
- dcl t4.xyz ; cubmap uvw coords
- dcl t5.xy ; sky uv coords
-
- dcl_2d s0 ; reflection map
- dcl_2d s1 ; noise1
- dcl_2d s2 ; noise2
- dcl_2d s3 ; lightmap
- dcl_cube s4 ; cubemap
- dcl_2d s5 ; sky
-
-
- texld r1, t1, s1 ; noise
- texld r2, t2, s2 ; noise
- texld r3, t3, s3 ; RGB: terrain colormap, A: terrain lightmap
- texld r4, t4, s4 ; cubemapa ze odbiciem slonca
- texld r5, t5, s5 ; clouds
-
- mul r0, r1, r2 ; creating noise
- mad r0, r0, c4.x, t0 ; ???
- texldp r0, r0, s0 ; wykrzywianie
-
- add_sat r1, r1, r2 ; maska do blikow
-
- sub r6.a, c4.y, r5.a ; negacja cienia chmur
- mul r3.a, r6.a, r3.a ; chmury * lightmapa
- mul r4, r4, r3 ; wyciecie blikow w cieniu
-
- sub r6, c4.y, r1 ; negacja noisa do blikā¤w
- mad_sat r0, r6, r4, r0 ; ograniczenie fal do odbicia od slonca
- mad_sat r3.rgb, r3.a, c7, c7.a ; zlagodzenie lightmapy
-
- mul r0.rgb, r0, r3 ; nalozenie lightmapy
-
- mov oC0, r0
-
- ")
-
-