home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 August / chip_08_2000.iso / aktualnosci / shareware / Rhinoceros / rh11eval_20000320.exe / %MAINDIR% / RIB / rh_spotlight.slc < prev    next >
Encoding:
Text File  |  2000-06-08  |  1.3 KB  |  84 lines

  1. version BMRT 2.4.0b
  2. light rh_spotlight
  3. param    color    lightcolor        1 1 1
  4. param    point    from        0 0 0
  5. local    string    $_str_0     "current"
  6. local    string    $_str_1     "shader"
  7. param    point    to        0 0 0
  8. param    float    coneangle        0.523599
  9. param    float    conedeltaangle        0.0872665
  10. param    float    beamdistribution        2
  11. local    float    atten    0
  12. local    float    cosangle    0
  13. local    vector    A    0 0 0
  14. local    float    intensity    0
  15. local    float    maxintensity    0
  16. initcode 1
  17.     pushiv    0 0 0 
  18.     pushs    $_str_0 
  19.     pushs    $_str_1 
  20.     ptransformss
  21.     popv    from 
  22. initcode 2
  23.     pushiv    0 0 1 
  24.     pushs    $_str_0 
  25.     pushs    $_str_1 
  26.     ptransformss
  27.     popv    to 
  28. initcode 5
  29.     return
  30. code
  31.     return_area
  32.     subVV    to from 
  33.     normalize
  34.     popv    A 
  35.     pushif    2 
  36.     pushc    lightcolor 
  37.     comp
  38.     pushif    1 
  39.     pushc    lightcolor 
  40.     comp
  41.     pushif    0 
  42.     pushc    lightcolor 
  43.     comp
  44.     fmax
  45.     fmax
  46.     popf    maxintensity 
  47.     pushif    20 
  48.     mulF    maxintensity 
  49.     exp
  50.     popf    intensity 
  51.     pushf    coneangle 
  52.     pushv    A 
  53.     pushv    from 
  54.     illuminate3    0
  55.     pushv    L 
  56.     length
  57.     pushv    A 
  58.     pushv    L 
  59.     vdot
  60.     divff
  61.     popf    cosangle 
  62.     pushv    L 
  63.     pushv    L 
  64.     vdot
  65.     pushf    beamdistribution 
  66.     pushf    cosangle 
  67.     pow
  68.     divff
  69.     popf    atten 
  70.     pushf    cosangle 
  71.     subFF    coneangle conedeltaangle 
  72.     cos
  73.     pushf    coneangle 
  74.     cos
  75.     smoothstep
  76.     mulF    atten 
  77.     popf    atten 
  78.     pushc    lightcolor 
  79.     mulFF    atten intensity 
  80.     mulfc
  81.     popc    Cl 
  82. label 0
  83.     return
  84.