<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=DE-CH link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>It should probably also read <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>out[i] = (in[i] &gt; 0.0f)?
pow(in[i],fac[0]): in[i];<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Instead of <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>out[i] = (in[i] &gt; 0.0f)?
pow(in[i],fac[0]): in[0];<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>or you'll replace all zero values with the
value of in[0], which is most likely NOT desired.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Cheers<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Remo<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><br>
<br>
</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> bf-committers-bounces@blender.org
[mailto:bf-committers-bounces@blender.org] <b>On Behalf Of </b>Matt Ebb<br>
<b>Sent:</b> Mittwoch, 9. Juli 2008 06:59<br>
<b>To:</b> bf-committers@blender.org<br>
<b>Subject:</b> Re: [Bf-committers] [Bf-blender-cvs] SVN
commit:/data/svn/bf-blender [14928] trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c:<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>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'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'm wrong, but it seems like it's only checking if the red
channel is less than zero, rather than each channel independently?<br>
<br>
cheers<br>
<br>
Matt<o:p></o:p></p>

<div>

<p class=MsoNormal>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:<o:p></o:p></p>

<p class=MsoNormal>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's on negative input.<br>
<br>
...<o:p></o:p></p>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>

<p class=MsoNormal><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'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;}<o:p></o:p></p>

</blockquote>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>