Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Dinges
c15b13f78f Cycles / Ramp closures:
* Fix crash with negative values in Phong Ramp, and add some checks to survive INF and NAN values. 

Patch by Brecht and myself.
2013-06-27 16:08:06 +00:00
Thomas Dinges
49115b4dd3 Cycles:
* Use float_to_int() functions in a few more places.
2013-06-09 15:09:15 +00:00
Thomas Dinges
7636aeffe1 Cycles / Math:
* Add M_2PI_F and M_4PI_F constants and use them inside the codebase.
2013-05-12 14:13:29 +00:00
Thomas Dinges
96a11219f6 Code cleanup / Cycles:
* Change some more if / else if conditions to switch / case. 
* Avoid an unneeded variable casting in phong_ramp closure.
2013-05-10 12:51:30 +00:00
Brecht Van Lommel
5616c7a058 Cycles: disable scaling up of ray differentials after diffuse/glossy bounce, this
isn't working well for OSL texture filtering and wasn't very helpful to begin
with, a better solution should be possible.
2012-12-12 14:43:07 +00:00
Brecht Van Lommel
4c13633582 Fix #33334: missing glossy label for OSL phong ramp caused assert. 2012-11-28 16:42:32 +00:00
Brecht Van Lommel
209cd25745 Cycles OSL: phong_ramp(N, exponent, colors[8]) closure added, which works like
a specular ramp shader. Note this is OSL only still, for experimenting.

Patch by Thomas.
2012-11-06 19:59:07 +00:00