<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Romz blog</title>
	<atom:link href="http://mouaif.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://mouaif.wordpress.com</link>
	<description>Computer graphics, shaders, generative coding</description>
	<lastBuildDate>Fri, 09 Oct 2009 00:19:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Photoshop math with GLSL shaders by BloggerDude</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-51</link>
		<dc:creator>BloggerDude</dc:creator>
		<pubDate>Fri, 09 Oct 2009 00:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-51</guid>
		<description>I don&#039;t know If I said it already but ...This blog rocks! I gotta say, that I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I&#039;m glad I found your blog.  Thanks, :)

A definite great read....</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know If I said it already but &#8230;This blog rocks! I gotta say, that I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I&#8217;m glad I found your blog.  Thanks, <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>A definite great read&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop gamma correction shader by Geometrian</title>
		<link>http://mouaif.wordpress.com/2009/01/22/photoshop-gamma-correction-shader/#comment-49</link>
		<dc:creator>Geometrian</dc:creator>
		<pubDate>Sun, 28 Jun 2009 06:12:14 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=133#comment-49</guid>
		<description>Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by Cory Plotts&#8217; Blog &#187; Blend Modes, Part II</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-48</link>
		<dc:creator>Cory Plotts&#8217; Blog &#187; Blend Modes, Part II</dc:creator>
		<pubDate>Wed, 17 Jun 2009 04:25:28 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-48</guid>
		<description>[...] wasn’t working. I tried to figure out what was wrong with it, but eventually I ran into another post that had a different way of expressing the math … it was in HLSL! Plugging in this HLSL worked! [...]</description>
		<content:encoded><![CDATA[<p>[...] wasn’t working. I tried to figure out what was wrong with it, but eventually I ran into another post that had a different way of expressing the math … it was in HLSL! Plugging in this HLSL worked! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by Daniel</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-47</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Sun, 24 May 2009 08:42:33 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-47</guid>
		<description>Hi, I&#039;ve been beating my brains out trying to blend two layers in case both are semitransparent. My results slightly differ from photoshop.

I write this shader (for ex., for difference):

// Performs &quot;over&quot;-type blending (colors must be premultiplied by alpha)
float4 blend(float4 overlying, float4 underlying)
{
      float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb);                      
      float alpha = underlying.a + (1-underlying.a)*overlying.a;
      return float4(blended, alpha);
}

// Performs advanced &quot;over&quot;-type blending
// (newcolor is the result of advanced blending (for ex, overlying.rgb * underlying.rgb))
float4 blend(float3 newcolor, float4 overlying, float4 underlying)
{     
      // Here the problem! (I think...)
      float alpha = overlying.a * underlying.a;
      float3 blended = newcolor*alpha + ((1-alpha)*overlying.rgb);
      
      return blend(float4(blended, overlying.a), underlying);
}

// Input images
sampler2D underlyingSampler : register(s0);
sampler2D overlyingSampler : register(s1);
// Opacity of source image
float opacity : register(c0);

float4 main(float2 uv : TEXCOORD) : COLOR 
{ 
      float4 overlying = tex2D(overlyingSampler, uv);
      float4 underlying = tex2D(underlyingSampler, uv); 
      overlying.a *= opacity;
      overlying.rgb *= overlying.a;
      underlying.rgb *= underlying.a;
      
      float4 result = blend(abs(overlying.rgb - underlying.rgb), overlying, underlying);
      return float4(result.rgb/result.a, result.a);
}</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;ve been beating my brains out trying to blend two layers in case both are semitransparent. My results slightly differ from photoshop.</p>
<p>I write this shader (for ex., for difference):</p>
<p>// Performs &#8220;over&#8221;-type blending (colors must be premultiplied by alpha)<br />
float4 blend(float4 overlying, float4 underlying)<br />
{<br />
      float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb);<br />
      float alpha = underlying.a + (1-underlying.a)*overlying.a;<br />
      return float4(blended, alpha);<br />
}</p>
<p>// Performs advanced &#8220;over&#8221;-type blending<br />
// (newcolor is the result of advanced blending (for ex, overlying.rgb * underlying.rgb))<br />
float4 blend(float3 newcolor, float4 overlying, float4 underlying)<br />
{<br />
      // Here the problem! (I think&#8230;)<br />
      float alpha = overlying.a * underlying.a;<br />
      float3 blended = newcolor*alpha + ((1-alpha)*overlying.rgb);</p>
<p>      return blend(float4(blended, overlying.a), underlying);<br />
}</p>
<p>// Input images<br />
sampler2D underlyingSampler : register(s0);<br />
sampler2D overlyingSampler : register(s1);<br />
// Opacity of source image<br />
float opacity : register(c0);</p>
<p>float4 main(float2 uv : TEXCOORD) : COLOR<br />
{<br />
      float4 overlying = tex2D(overlyingSampler, uv);<br />
      float4 underlying = tex2D(underlyingSampler, uv);<br />
      overlying.a *= opacity;<br />
      overlying.rgb *= overlying.a;<br />
      underlying.rgb *= underlying.a;</p>
<p>      float4 result = blend(abs(overlying.rgb &#8211; underlying.rgb), overlying, underlying);<br />
      return float4(result.rgb/result.a, result.a);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Levels control shader by Mike</title>
		<link>http://mouaif.wordpress.com/2009/01/28/levels-control-shader/#comment-46</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Mon, 02 Mar 2009 19:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=152#comment-46</guid>
		<description>Just passing by.Btw, you website have great content!

______________________________
Don&#039;t pay for your electricity any longer...
&lt;a href=&quot;http://mikewilson.byethost31.com&quot; rel=&quot;nofollow&quot;&gt;Instead, the power company will pay YOU!&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Just passing by.Btw, you website have great content!</p>
<p>______________________________<br />
Don&#8217;t pay for your electricity any longer&#8230;<br />
<a href="http://mikewilson.byethost31.com" rel="nofollow">Instead, the power company will pay YOU!</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by israel</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-40</link>
		<dc:creator>israel</dc:creator>
		<pubDate>Sat, 24 Jan 2009 19:00:52 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-40</guid>
		<description>Thanks very much.Works well.
I will see you web page to knews comments.

Thanks for all.</description>
		<content:encoded><![CDATA[<p>Thanks very much.Works well.<br />
I will see you web page to knews comments.</p>
<p>Thanks for all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by Romz</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-39</link>
		<dc:creator>Romz</dc:creator>
		<pubDate>Sat, 24 Jan 2009 13:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-39</guid>
		<description>You can use my code and do:
vec3 hsl = RGBToHSL(texture2d(yourTexture, yourUV).rgb);
hsl.x = whateverYouWant; // .x is hue, .y is saturation, .z is brightness
vec3 color = HSLToRGB(hsl);</description>
		<content:encoded><![CDATA[<p>You can use my code and do:<br />
vec3 hsl = RGBToHSL(texture2d(yourTexture, yourUV).rgb);<br />
hsl.x = whateverYouWant; // .x is hue, .y is saturation, .z is brightness<br />
vec3 color = HSLToRGB(hsl);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by israel</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-38</link>
		<dc:creator>israel</dc:creator>
		<pubDate>Sat, 24 Jan 2009 02:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-38</guid>
		<description>Hello, and thanks for your webside and sorry my bad english.

I will like to know how I  change in the fragment shader  the HUE of a texture . and not modify the saturation and brithness

Thanks for all</description>
		<content:encoded><![CDATA[<p>Hello, and thanks for your webside and sorry my bad english.</p>
<p>I will like to know how I  change in the fragment shader  the HUE of a texture . and not modify the saturation and brithness</p>
<p>Thanks for all</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by Photoshop gamma correction shader &#171; Romz blog</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-37</link>
		<dc:creator>Photoshop gamma correction shader &#171; Romz blog</dc:creator>
		<pubDate>Wed, 21 Jan 2009 23:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-37</guid>
		<description>[...] I added the code in my Photoshop Math (GLSL/HLSL) shaders. [...]</description>
		<content:encoded><![CDATA[<p>[...] I added the code in my Photoshop Math (GLSL/HLSL) shaders. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Photoshop math with GLSL shaders by repii</title>
		<link>http://mouaif.wordpress.com/2009/01/05/photoshop-math-with-glsl-shaders/#comment-33</link>
		<dc:creator>repii</dc:creator>
		<pubDate>Wed, 07 Jan 2009 00:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://mouaif.wordpress.com/?p=94#comment-33</guid>
		<description>Great post! Implemented many of the photoshop blend modes in HLSL myself a while ago, but not as many as you&#039;ve done here.</description>
		<content:encoded><![CDATA[<p>Great post! Implemented many of the photoshop blend modes in HLSL myself a while ago, but not as many as you&#8217;ve done here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
