ps_2_0

dcl t0 //mask
dcl t1 //texmin
dcl t2 //texmax
dcl v0 //fog

dcl_2d s0 //mask
dcl_2d s1 //grass
dcl_2d s2 //stone

def c0, 6, -2.5, 1, 0
def c1, 0.75, 0.75, 0.5, -0.1

texld r0, t0, s0

texld r1, t1, s1
texld r2, t1, s2
texld r3, t2, s2

mad r0.r, r0.r, c0.r, c0.g
min r0.r, r0.r, c0.b
max r0.r, r0.r, c0.a

lrp r4, r0.r, r2, r1
mad r3, r3, c1.r, c1.g
mul r4, r4, r3
mul r4, r4, r0.a
lrp r4.rgb, v0.a, r4, v0
mov oC0, r4

