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

  1. version BMRT 2.4.0b
  2. surface rh_brushedmetal
  3. param    float    Ka        1
  4. param    float    Kd        0.1
  5. param    float    Ks        0.9
  6. param    float    uroughness        0.35
  7. param    float    vroughness        0.2
  8. local    string    $_str_0     "__nonspecular"
  9. local    normal    Nf    0 0 0
  10. local    vector    xdir    0 0 0
  11. local    color    spec    0 0 0
  12. local    vector    _1$V    0 0 0
  13. code
  14. local    float    _1$cos_theta_r    0
  15. local    vector    _1$X    0 0 0
  16. local    vector    _1$Y    0 0 0
  17. local    color    _1$C    0 0 0
  18. local    float    _4$nonspec    0
  19. local    float    __float_dummy    0
  20. code
  21. local    vector    _6$LN    0 0 0
  22. local    float    _6$cos_theta_i    0
  23. local    vector    _8$H    0 0 0
  24. local    float    _8$rho    0
  25. local    float    _2$x    0
  26. code
  27. initcode 4
  28.     return
  29. code
  30.     return_area
  31.     pushv    I 
  32.     pushv    N 
  33.     normalize
  34.     faceforward
  35.     popv    Nf 
  36.     pushv    dPdu 
  37.     normalize
  38.     popv    xdir 
  39.     pushv    I 
  40.     normalize
  41.     negv
  42.     popv    _1$V 
  43.     pushif    1 
  44.     pushif    0.0001 
  45.     pushv    _1$V 
  46.     pushv    Nf 
  47.     vdot
  48.     fclamp
  49.     popf    _1$cos_theta_r 
  50.     pushf    uroughness 
  51.     pushv    xdir 
  52.     divvf
  53.     popv    _1$X 
  54.     pushf    vroughness 
  55.     pushv    xdir 
  56.     pushv    Nf 
  57.     cross
  58.     divvf
  59.     popv    _1$Y 
  60.     pushif    0 
  61.     cset    _1$C 
  62.     pushif    2 
  63.     pushif    3.14159 
  64.     divff
  65.     pushv    Nf 
  66.     pushv    P 
  67.     illuminance_start
  68. label 1
  69.     illuminance3    2
  70.     pushif    0 
  71.     popf    _4$nonspec 
  72.     pushs    $_str_0 
  73.     pushif    1 
  74.     lightsourceM    _4$nonspec 
  75.     popf    __float_dummy 
  76.     pushif    1 
  77.     pushf    _4$nonspec 
  78.     lt
  79.     ifz    3
  80.     pushv    L 
  81.     normalize
  82.     popv    _6$LN 
  83.     pushv    Nf 
  84.     pushv    _6$LN 
  85.     vdot
  86.     popf    _6$cos_theta_i 
  87.     pushif    0 
  88.     pushf    _6$cos_theta_i 
  89.     gt
  90.     ifz    5
  91.     addVV    _1$V _6$LN 
  92.     normalize
  93.     popv    _8$H 
  94.     mulFF    _6$cos_theta_i _1$cos_theta_r 
  95.     sqrt
  96.     pushv    Nf 
  97.     pushv    _8$H 
  98.     vdot
  99.     pushif    1 
  100.     addff
  101.     pushv    _8$H 
  102.     pushv    _1$Y 
  103.     vdot
  104.     popf    _2$x 
  105.     mulFF    _2$x _2$x 
  106. label 7
  107.     pushv    _8$H 
  108.     pushv    _1$X 
  109.     vdot
  110.     popf    _2$x 
  111.     mulFF    _2$x _2$x 
  112. label 8
  113.     addff
  114.     divff
  115.     pushif    -2 
  116.     mulff
  117.     exp
  118.     divff
  119.     popf    _8$rho 
  120.     pushf    _8$rho 
  121.     pushf    _6$cos_theta_i 
  122.     pushf    _4$nonspec 
  123.     pushif    1 
  124.     subff
  125.     mulff
  126.     mulff
  127.     pushc    Cl 
  128.     mulcf
  129.     addC    _1$C 
  130.     popc    _1$C 
  131. label 5
  132. label 6
  133. label 3
  134. label 4
  135.     jump    1
  136. label 2
  137.     pushf    vroughness 
  138.     pushf    uroughness 
  139.     pushif    4 
  140.     mulff
  141.     mulff
  142.     pushc    _1$C 
  143.     divcf
  144. label 0
  145.     popc    spec 
  146.     mulFC    Ks spec 
  147.     pushv    Nf 
  148.     diffuse
  149.     mulFc    Kd 
  150.     ambient
  151.     mulFc    Ka 
  152.     addcc
  153.     addcc
  154.     mulC    Cs 
  155.     popc    Ci 
  156.     cpCC    Os Oi 
  157.     pushc    Oi 
  158.     mulC    Ci 
  159.     popc    Ci 
  160.     return
  161.