home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Utility / 5-11_xp-2k_dd_ccc_wdm_enu_27345.exe / Data1.cab / _301C3507AC50475D860A9FFC764FBE86 < prev    next >
Text File  |  2004-01-22  |  686b  |  20 lines

  1. !!ARBfp1.0
  2. ATTRIB  extinction = fragment.color.primary;
  3. ATTRIB  inscattering = fragment.color.secondary;
  4.  
  5. PARAM   USEFUL = {0.0, 0.5, 1.0, 2.0};
  6.  
  7. ATTRIB  litcolor = fragment.texcoord[2];
  8.  
  9. TEMP    terrain, clouds;
  10.  
  11. TEX     terrain, fragment.texcoord[0], texture[0], 2D;
  12. TEX     clouds, fragment.texcoord[1], texture[1], 2D;
  13.  
  14. MUL     terrain.rgb, terrain, litcolor;           # Vertex color * terrain texture
  15. MAD     clouds, clouds, -USEFUL.y, USEFUL.z;      # clouds = 1-0.5*clouds
  16. MUL     terrain, terrain, clouds;
  17. MUL     terrain, terrain, extinction;         # Apply extinction
  18. ADD     result.color, terrain, inscattering; # Final color with added inscattering
  19. END
  20.