ps_2_0
// combines texture tunnel coordinates
// tex0 - source 256x256 tunnel coord texture
// c0.xy - source window 1 center
// c0.zw - source window 2 center
// c1.xy - additional coords
// source windows are 128x128 on source tunnel coord texture
dcl t0
dcl_2d s0
def c1,0.5,0.5,0.5,0.25
mov r8,c0
add r8,r8,c1.w
mul r1,t0,c1.z
add r0.x,r1.x,r8.x
add r0.y,r1.y,r8.y
texld r0,r0,s0
add r1.x,r1.x,r8.z
add r1.y,r1.y,r8.w
texld r1,r1,s0
add r0,r0,r1
add r0,r0,c1
frc r0,r0
mov oC0,r0
