home *** CD-ROM | disk | FTP | other *** search
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %sunvisibility )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
-
- pshader("
-
- ps_1_4
-
- texld r0, t0 ;RGB=terrain colormap, A=terrain lightmap
- texld r1, t1 ;terrain detail
- texld r2, t2 ;road detail
- texld r3, t3 ;detailmasks
- texld r4, t4 ;clouds
- texld r5, t5 ;road
-
- lrp r1.rgb, r3.b, r2, r1 ;terrain detail blend road detail with detailmasks = R1.RGB blended details
- +mul r0.a, 1-r4.a, r0.a ; clouds shadow * terrain lightmap = R0.A static lighting
-
- mul r0.rgb, r0, r1 ;terrain color * blended details = R0.RGB terrain
- +mov_x4_sat r3.a, r5.a ;road opacity mask = R3.A road opacity mask
-
- lrp r0.rgb, r3.a, r5, r0 ;terrain color blend road with road opacity mask = terrain & road
- +mul_sat r1.a, r5_bx2.a, c5.a ;specular mask extraction
-
- mul r1.a, r1.a, r0.a ;speculara * static lighting = R1.A Masked specular
-
- mad_sat r0.rgb, v1, r1.a, r0
- +mad_sat r0.a, r0.a, c7.b, c7.a ;ambient + static lighting = R0.A static lighting
-
- mul r4.rgb, r0.a, c5 ;day * static lighting = R4.RGB world lighting
-
- mul r0, r0, r4 ;light color
-
-
- ")
-
-