#!version 2.2.6 light #!parameters: uniform float intensity = 1 uniform color lightcolor = 1 uniform string shadowname_px = "" uniform string shadowname_nx = "" uniform string shadowname_py = "" uniform string shadowname_ny = "" uniform string shadowname_pz = "" uniform string shadowname_nz = "" uniform point from = "shader" [ 0 0 0 ] #!variables: uniform vector temporary_0 varying float vis varying float atten varying float ax varying float ay varying float az varying vector Lworld varying float temporary_1 uniform float temporary_2 uniform float temporary_3 uniform float temporary_4 uniform float temporary_5 uniform float temporary_6 uniform float temporary_7 uniform float temporary_8 varying vector temporary_9 varying float temporary_10 varying float temporary_11 varying vector temporary_12 varying vector temporary_13 varying vector temporary_14 uniform vector temporary_15 varying float temporary_16 varying float temporary_17 varying float temporary_18 varying float temporary_19 #!Init: vfromf temporary_0 0 0 0 pfrom from "shader" temporary_0 return #!Code: seql temporary_7 shadowname_px "" seql temporary_8 shadowname_nx "" or temporary_6 temporary_7 temporary_8 seql temporary_7 shadowname_py "" or temporary_5 temporary_6 temporary_7 seql temporary_6 shadowname_ny "" or temporary_4 temporary_5 temporary_6 seql temporary_5 shadowname_pz "" or temporary_3 temporary_4 temporary_5 seql temporary_4 shadowname_nz "" or temporary_2 temporary_3 temporary_4 vufloat temporary_1 temporary_2 if temporary_1 #!Label18 vuvector temporary_9 from illuminate temporary_9 #!Label19 vufloat temporary_10 1 shadow ("f=SFp") temporary_11 "raytrace" 0 Ps subff vis temporary_10 temporary_11 vufloat temporary_11 intensity mulff temporary_10 vis temporary_11 vfromf temporary_13 temporary_10 vuvector temporary_14 lightcolor mulvv temporary_12 temporary_13 temporary_14 dot temporary_10 L L vfromf temporary_13 temporary_10 divvv Cl temporary_12 temporary_13 #!Label19: endilluminate #!Label18: else #!Label17 vuvector temporary_9 from illuminate temporary_9 #!Label20 vfromf temporary_15 0 0 0 pfrom temporary_0 "world" temporary_15 vuvector temporary_13 temporary_0 addvv temporary_12 L temporary_13 transform ("p=Sp") Lworld "world" temporary_12 xcomp ("f=p") temporary_10 Lworld abs ("f=f") ax temporary_10 ycomp ("f=p") temporary_10 Lworld abs ("f=f") ay temporary_10 zcomp ("f=p") temporary_10 Lworld abs ("f=f") az temporary_10 vufloat atten 0 fgt temporary_11 ax ay fgt temporary_16 ax az and temporary_10 temporary_11 temporary_16 if temporary_10 #!Label22 xcomp ("f=p") temporary_16 Lworld vufloat temporary_17 0.0 fgt temporary_11 temporary_16 temporary_17 if temporary_11 #!Label24 shadow ("f=SFp") atten shadowname_px 0 Ps #!Label24: else #!Label23 shadow ("f=SFp") atten shadowname_nx 0 Ps #!Label23: endif #!Label22: else #!Label21 fgt temporary_16 ay ax fgt temporary_17 ay az and temporary_11 temporary_16 temporary_17 if temporary_11 #!Label26 ycomp ("f=p") temporary_17 Lworld vufloat temporary_18 0.0 fgt temporary_16 temporary_17 temporary_18 if temporary_16 #!Label28 shadow ("f=SFp") atten shadowname_py 0 Ps #!Label28: else #!Label27 shadow ("f=SFp") atten shadowname_ny 0 Ps #!Label27: endif #!Label26: else #!Label25 fgt temporary_17 az ay fgt temporary_18 az ax and temporary_16 temporary_17 temporary_18 if temporary_16 #!Label29 zcomp ("f=p") temporary_18 Lworld vufloat temporary_19 0.0 fgt temporary_17 temporary_18 temporary_19 if temporary_17 #!Label32 shadow ("f=SFp") atten shadowname_pz 0 Ps #!Label32: else #!Label31 shadow ("f=SFp") atten shadowname_nz 0 Ps #!Label31: endif #!Label29: endif #!Label25: endif #!Label21: endif vufloat temporary_16 1.0 subff temporary_11 temporary_16 atten vufloat temporary_16 intensity mulff temporary_10 temporary_11 temporary_16 vfromf temporary_13 temporary_10 vuvector temporary_14 lightcolor mulvv temporary_12 temporary_13 temporary_14 dot temporary_10 L L vfromf temporary_13 temporary_10 divvv Cl temporary_12 temporary_13 #!Label20: endilluminate #!Label17: endif return