[Bf-codereview] Brightness/Contrast Node for Cycles (issue 5564044)

brechtvanlommel at gmail.com brechtvanlommel at gmail.com
Mon Jan 23 17:24:26 CET 2012


http://codereview.appspot.com/5564044/diff/1/intern/cycles/kernel/svm/svm_brightness.h
File intern/cycles/kernel/svm/svm_brightness.h (right):

http://codereview.appspot.com/5564044/diff/1/intern/cycles/kernel/svm/svm_brightness.h#newcode30
intern/cycles/kernel/svm/svm_brightness.h:30: brightness /= 100.0;
Add f postfix so we're not doing doubles math. Also *= 1.0f/100.0f; here
and the line below is a bit quicker.

http://codereview.appspot.com/5564044/diff/1/intern/cycles/kernel/svm/svm_brightness.h#newcode41
intern/cycles/kernel/svm/svm_brightness.h:41: a = 1.0 / a;
Setting contrast to 100 will give division by zero here, needs check.

http://codereview.appspot.com/5564044/


More information about the Bf-codereview mailing list