Hi, I realise this is an old commit, but I was looking inside the gamma node code today and saw what I think is an error - shouldn&#39;t that line read<br><br>out[i] = (in[i] &gt; 0.0f)? pow(in[i],fac[0]): in[0];<br><br>rather than<br>
<br>out[i] = (in[0] &gt; 0.0f)? pow(in[i],fac[0]): in[0];<br><br>?<br><br>Correct me if I&#39;m wrong, but it seems like it&#39;s only checking if the red channel is less than zero, rather than each channel independently?<br>
<br>cheers<br><br>Matt<br><br><div class="gmail_quote">On Fri, May 23, 2008 at 12:56 AM, Brecht Van Lommel &lt;<a href="mailto:brechtvanlommel@pandora.be">brechtvanlommel@pandora.be</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Revision: 14928<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&amp;root=bf-blender&amp;revision=14928" target="_blank">http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&amp;root=bf-blender&amp;revision=14928</a><br>

Author: &nbsp; blendix<br>
Date: &nbsp; &nbsp; 2008-05-22 16:56:32 +0200 (Thu, 22 May 2008)<br>
<br>
Log Message:<br>
-----------<br>
<br>
Fix for part of bug #12075: gamma node generated nan&#39;s on negative input.<br>
<br>
...</blockquote><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
&nbsp;{<br>
 &nbsp; &nbsp; &nbsp; &nbsp;int i=0;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;for(i=0; i&lt;3; i++) {<br>
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out[i] = pow(in[i],fac[0]);<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* check for negative to avoid nan&#39;s */<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; out[i] = (in[0] &gt; 0.0f)? pow(in[i],fac[0]): in[0];<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp;out[3] = in[3];<br>
&nbsp;}</blockquote></div><br>