// // Placeholder outdoor sky texture // // Modified by GoliathVT on Jan 3, 2005 // // The sky texture will now fade according // to night and day cycles // // Fixed by passing the current time using Parm9 to effectively "reset" // the lookup time to zero... this allows the CLAMPed lookup table // to repeat itself AND ensures that there are no syncronization // problems. A single lookup table can also be used in this case // because a value of 1 can be added and then time * Parm10 can be // subtracted, effectively running the lookup table backwards (1->0). // // See the fadeSky() levelscript function for more details. // table skyFadeTable { clamp { 0, 1 } } ///////////////////////////////////////////////////////////////////////////// textures/euro/skies/spannerday { qer_editorimage env/spannerday_up.tga noFragment noshadows noimpact nooverlays forceOpaque { if (Parm11 == 0) // stay day blend add cameraCubeMap env/spannerday texgen skybox texgen wobblesky .0 .0 .0 rgb 1 } ///////////////////////////////////////////////////////////////////////////// { if (Parm11 == 1) // fade to night: // fade out day sky blend add cameraCubeMap env/spannerday texgen skybox texgen wobblesky .0 .0 .0 rgb skyFadeTable[ (-1 * (time - Parm9) * Parm10 + 1) ] } { if (Parm11 == 1) // fade to night: // fade in night sky blend add cameraCubeMap env/spannernight texgen skybox texgen wobblesky .0 .0 .0 rgb skyFadeTable[ ((time - Parm9) * Parm10) ] } ///////////////////////////////////////////////////////////////////////////// { if (Parm11 == 2) // stay night blend add cameraCubeMap env/spannernight texgen skybox texgen wobblesky .0 .0 .0 rgb 1 } ///////////////////////////////////////////////////////////////////////////// { if (Parm11 == 3) // fade to day: // fade out night sky blend add cameraCubeMap env/spannernight texgen skybox texgen wobblesky .0 .0 .0 rgb skyFadeTable[ (-1 * (time - Parm9) * Parm10 + 1) ] } { if (Parm11 == 3) // fade to day: // fade in day sky blend add cameraCubeMap env/spannerday texgen skybox texgen wobblesky .0 .0 .0 rgb skyFadeTable[ ((time - Parm9) * Parm10) ] } } // EOF