<?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/"
		>
<channel>
	<title>Comments on: Step 14: HLSL. Writing pixel shader effect.</title>
	<atom:link href="http://www.ludumdare.com/compo/2009/04/19/step-14-hlsl-writing-pixel-shader-effect/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ludumdare.com/compo/2009/04/19/step-14-hlsl-writing-pixel-shader-effect/</link>
	<description>A tri-annual 48 hour solo game development competition.</description>
	<lastBuildDate>Fri, 10 Feb 2012 10:55:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: mathias</title>
		<link>http://www.ludumdare.com/compo/2009/04/19/step-14-hlsl-writing-pixel-shader-effect/comment-page-1/#comment-5783</link>
		<dc:creator>mathias</dc:creator>
		<pubDate>Sun, 19 Apr 2009 20:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/?p=5593#comment-5783</guid>
		<description>Well, with opengl it would be something like this in the fragment shader, I guess:

uniform sampler2D texUnit0;
uniform int alpha;

void main(void) {
    vec4 color;
    color = texture2D(texUnit0, gl_TexCoord[0].xy);
    if(color.a != 255) color.a = alpha; // dont fade the pixels in that are meant to be transparent?

    gl_FragColor = color;
}

Dunno, just typed that out of my head and it is no use for you anyways since you need a HLSL snippet.. but what the hell?</description>
		<content:encoded><![CDATA[<p>Well, with opengl it would be something like this in the fragment shader, I guess:</p>
<p>uniform sampler2D texUnit0;<br />
uniform int alpha;</p>
<p>void main(void) {<br />
    vec4 color;<br />
    color = texture2D(texUnit0, gl_TexCoord[0].xy);<br />
    if(color.a != 255) color.a = alpha; // dont fade the pixels in that are meant to be transparent?</p>
<p>    gl_FragColor = color;<br />
}</p>
<p>Dunno, just typed that out of my head and it is no use for you anyways since you need a HLSL snippet.. but what the hell?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jph</title>
		<link>http://www.ludumdare.com/compo/2009/04/19/step-14-hlsl-writing-pixel-shader-effect/comment-page-1/#comment-5782</link>
		<dc:creator>jph</dc:creator>
		<pubDate>Sun, 19 Apr 2009 20:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.ludumdare.com/compo/?p=5593#comment-5782</guid>
		<description>humm,. can&#039;t you do it with a simple alpha fade,. or colour shift?  I have used both to good effect,. you also could draw a big sprite to fill the screen and fade it in or fade all the rest out,. . .</description>
		<content:encoded><![CDATA[<p>humm,. can&#8217;t you do it with a simple alpha fade,. or colour shift?  I have used both to good effect,. you also could draw a big sprite to fill the screen and fade it in or fade all the rest out,. . .</p>
]]></content:encoded>
	</item>
</channel>
</rss>

