<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Game Rendering &#187; Rendering</title>
	<atom:link href="http://www.gamerendering.com/tag/rendering/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gamerendering.com</link>
	<description></description>
	<lastBuildDate>Thu, 21 Jan 2010 01:32:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Welcome to Game Rendering!</title>
		<link>http://www.gamerendering.com/2008/09/24/welcome-to-game-rendering/</link>
		<comments>http://www.gamerendering.com/2008/09/24/welcome-to-game-rendering/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 00:03:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Computer Graphics]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.gamerendering.com/?p=14</guid>
		<description><![CDATA[While developing games I&#8217;ve been collecting lots of links to useful pages and as they increased in amount I needed some way to organize them. I realized that they might be useful for others too so I decided to create a simple website with the links and other information I&#8217;ve collected. I have just finished studying for [...]]]></description>
			<content:encoded><![CDATA[<div class="announcement_post"><p lang="en-US">While developing games I&#8217;ve been collecting lots of links to useful pages and as they increased in amount I needed some way to organize them. I realized that they might be useful for others too so I decided to create a simple website with the links and other information I&#8217;ve collected. I have just finished studying for my Master degree in Software engineering and is especially interested in computer graphics and game rendering. This site is therefore also created as a learning project for me and can therefore contain information that is incorrect somewhere. If you ever find something that&#8217;s wrong I would be happy if you informed me by commenting the site.</p>
<p lang="en-US">New articles will be posted as often I can.</p>
<p lang="en-US">I&#8217;m currently working on adding online demos for the articles so one can view the result immediately.</p>
<p lang="en-US">/ Robert</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Please share:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521%26amp%3Bbodytext%3DWhile%2520developing%2520games%2520I%2527ve%2520been%2520collecting%2520lots%2520of%2520links%2520to%2520useful%2520pages%2520and%2520as%2520they%2520increased%2520in%2520amount%2520I%2520needed%2520some%2520way%2520to%2520organize%2520them.%2520I%2520realized%2520that%2520they%2520might%2520be%2520useful%2520for%2520others%2520too%2520so%2520I%2520decided%2520to%2520create%2520a%2520simple%2520website%2520with%2520the%2520links%2520a';" title="Digg"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="sphinn" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F';" title="Sphinn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521%26amp%3Bnotes%3DWhile%2520developing%2520games%2520I%2527ve%2520been%2520collecting%2520lots%2520of%2520links%2520to%2520useful%2520pages%2520and%2520as%2520they%2520increased%2520in%2520amount%2520I%2520needed%2520some%2520way%2520to%2520organize%2520them.%2520I%2520realized%2520that%2520they%2520might%2520be%2520useful%2520for%2520others%2520too%2520so%2520I%2520decided%2520to%2520create%2520a%2520simple%2520website%2520with%2520the%2520links%2520a';" title="del.icio.us"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Bt%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="Facebook"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx" href="javascript:window.location='http%3A%2F%2Fwww.mixx.com%2Fsubmit%3Fpage_url%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="Mixx"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521%26amp%3Bannotation%3DWhile%2520developing%2520games%2520I%2527ve%2520been%2520collecting%2520lots%2520of%2520links%2520to%2520useful%2520pages%2520and%2520as%2520they%2520increased%2520in%2520amount%2520I%2520needed%2520some%2520way%2520to%2520organize%2520them.%2520I%2520realized%2520that%2520they%2520might%2520be%2520useful%2520for%2520others%2520too%2520so%2520I%2520decided%2520to%2520create%2520a%2520simple%2520website%2520with%2520the%2520links%2520a';" title="Google Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="current" href="javascript:window.location='http%3A%2F%2Fcurrent.com%2Fclipper.htm%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="Current"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="linkedin" href="javascript:window.location='http%3A%2F%2Fwww.linkedin.com%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521%26amp%3Bsource%3DGame%2BRendering%2B%26amp%3Bsummary%3DWhile%2520developing%2520games%2520I%2527ve%2520been%2520collecting%2520lots%2520of%2520links%2520to%2520useful%2520pages%2520and%2520as%2520they%2520increased%2520in%2520amount%2520I%2520needed%2520some%2520way%2520to%2520organize%2520them.%2520I%2520realized%2520that%2520they%2520might%2520be%2520useful%2520for%2520others%2520too%2520so%2520I%2520decided%2520to%2520create%2520a%2520simple%2520website%2520with%2520the%2520links%2520a';" title="LinkedIn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="live" href="javascript:window.location='https%3A%2F%2Ffavorites.live.com%2Fquickadd.aspx%3Fmarklet%3D1%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="Live"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="myspace" href="javascript:window.location='http%3A%2F%2Fwww.myspace.com%2FModules%2FPostTo%2FPages%2F%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Bt%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="MySpace"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="netvibes" href="javascript:window.location='http%3A%2F%2Fwww.netvibes.com%2Fshare%3Ftitle%3DWelcome%2520to%2520Game%2520Rendering%2521%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F';" title="Netvibes"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="StumbleUpon"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="twitter" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DWelcome%2520to%2520Game%2520Rendering%2521%2520-%2520http%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F';" title="Twitter"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit" href="javascript:window.location='http%3A%2F%2Freddit.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Btitle%3DWelcome%2520to%2520Game%2520Rendering%2521';" title="Reddit"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F';" title="Technorati"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2008%252F09%252F24%252Fwelcome-to-game-rendering%252F%26amp%3Bt%3DWelcome%2520to%2520Game%2520Rendering%2521%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DWhile%2520developing%2520games%2520I%2527ve%2520been%2520collecting%2520lots%2520of%2520links%2520to%2520useful%2520pages%2520and%2520as%2520they%2520increased%2520in%2520amount%2520I%2520needed%2520some%2520way%2520to%2520organize%2520them.%2520I%2520realized%2520that%2520they%2520might%2520be%2520useful%2520for%2520others%2520too%2520so%2520I%2520decided%2520to%2520create%2520a%2520simple%2520website%2520with%2520the%2520links%2520a';" title="Yahoo! Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.gamerendering.com/2008/09/24/welcome-to-game-rendering/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>VPOS</title>
		<link>http://www.gamerendering.com/2009/12/07/vpos/</link>
		<comments>http://www.gamerendering.com/2009/12/07/vpos/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 15:35:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Shaders]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Pixel Shader]]></category>
		<category><![CDATA[Render-to-Texture]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[SM3]]></category>
		<category><![CDATA[VPOS]]></category>

		<guid isPermaLink="false">http://www.gamerendering.com/?p=735</guid>
		<description><![CDATA[Starting with DirectX Pixel Shader Model 3.0 there exist an input type called VPOS. It&#8217;s the current pixels position on the screen and it&#8217;s automatically generated. This can be useful when sampling from a previously rendered texture when rendering an arbitrarily shaped mesh to the screen. To do this, we need uv-coords that represents where [...]]]></description>
			<content:encoded><![CDATA[<p>Starting with DirectX Pixel Shader Model 3.0 there exist an input type called VPOS. It&#8217;s the current pixels position on the screen and it&#8217;s automatically generated. This can be useful when sampling from a previously rendered texture when rendering an arbitrarily shaped mesh to the screen. To do this, we need uv-coords that represents where to sample on the texture. These coordinates can be gained by simply dividing VPOS with the screen dimensions.<br />
When working with older hardware, that doesn&#8217;t support shader model 3.0, there is a need to manually create the VPOS in the vertex shader and pass it to the fragment shader as a TEXCOORD. This is the way to do so ( including the scaling to uv-range which manually has to be done for VPOS if you&#8217;re using it).</p>
<p><strong>Vertex Shader:</strong></p>

<div class="wp_codebox"><table width="100%" ><tr id="p7355"><td class="code" id="p735code5"><pre class="c" style="font-family:monospace;">float4x4 matWorldViewProjection<span style="color: #339933;">;</span>
float2 fInverseViewportDimensions<span style="color: #339933;">;</span>
<span style="color: #993333;">struct</span> VS_INPUT
<span style="color: #009900;">&#123;</span>
   float4 Position <span style="color: #339933;">:</span> POSITION0<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #993333;">struct</span> VS_OUTPUT
<span style="color: #009900;">&#123;</span>
   float4 Position <span style="color: #339933;">:</span> POSITION0<span style="color: #339933;">;</span>
   float4 calculatedVPos <span style="color: #339933;">:</span> TEXCOORD0<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
float4 ConvertToVPos<span style="color: #009900;">&#40;</span> float4 p <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">return</span> float4<span style="color: #009900;">&#40;</span> <span style="color:#800080;">0.5</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span> float2<span style="color: #009900;">&#40;</span>p.<span style="color: #202020;">x</span> <span style="color: #339933;">+</span> p.<span style="color: #202020;">w</span><span style="color: #339933;">,</span> p.<span style="color: #202020;">w</span> <span style="color: #339933;">-</span> p.<span style="color: #202020;">y</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> p.<span style="color: #202020;">w</span><span style="color: #339933;">*</span>fInverseViewportDimensions.<span style="color: #202020;">xy</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> p.<span style="color: #202020;">zw</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
VS_OUTPUT vs_main<span style="color: #009900;">&#40;</span> VS_INPUT Input <span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   VS_OUTPUT Output<span style="color: #339933;">;</span>
   Output.<span style="color: #202020;">Position</span> <span style="color: #339933;">=</span> mul<span style="color: #009900;">&#40;</span> Input.<span style="color: #202020;">Position</span><span style="color: #339933;">,</span> matWorldViewProjection <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   Output.<span style="color: #202020;">calculatedVPos</span> <span style="color: #339933;">=</span> ConvertToVPos<span style="color: #009900;">&#40;</span>Output.<span style="color: #202020;">Position</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span> Output <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Pixel Shader:<br />
</strong></p>

<div class="wp_codebox"><table width="100%" ><tr id="p7356"><td class="code" id="p735code6"><pre class="c" style="font-family:monospace;">float4 ps_main<span style="color: #009900;">&#40;</span>VS_OUTPUT Input<span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> COLOR0
<span style="color: #009900;">&#123;</span>
   Input.<span style="color: #202020;">calculatedVPos</span> <span style="color: #339933;">/=</span> Input.<span style="color: #202020;">calculatedVPos</span>.<span style="color: #202020;">w</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">return</span> float4<span style="color: #009900;">&#40;</span>Input.<span style="color: #202020;">calculatedVPos</span>.<span style="color: #202020;">xy</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// test render it to the screen</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The image below shows an elephant model rendered with the shader above. As can be seen, the color (red and green channels) correctly represents the uv-coords for a fullscreen quad. Since 0,0,0 = black, 1,0,0 = red, 0,1,0 = green, 1, 1,0 = yellow.</p>
<div class="mceTemp"><a href="http://www.gamerendering.com/wp-content/uploads/vPosElephant.JPG"><img class="size-full wp-image-736" title="VPOS Elephant" src="http://www.gamerendering.com/wp-content/uploads/vPosElephant.JPG" alt="VPOS Elephant" width="177" height="162" /></a></div>
<div class="mceTemp">This is how the pixel shader would have looked like if VPOS were used instead (note: no special vertex shader needed in this case).</div>

<div class="wp_codebox"><table width="100%" ><tr id="p7357"><td class="code" id="p735code7"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">struct</span> PS_INPUT
<span style="color: #009900;">&#123;</span>
   float2 vPos <span style="color: #339933;">:</span> VPOS<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<div class="wp_codebox"><table width="100%" ><tr id="p7358"><td class="code" id="p735code8"><pre class="c" style="font-family:monospace;">float4 ps_main<span style="color: #009900;">&#40;</span>PS_INPUT Input<span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> COLOR0
<span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">return</span> float4<span style="color: #009900;">&#40;</span>Input.<span style="color: #202020;">vPos</span><span style="color: #339933;">*</span>fInverseViewportDimensions <span style="color: #339933;">+</span> fInverseViewportDimensions<span style="color: #339933;">*</span><span style="color:#800080;">0.5</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// test render it to the screen</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The original code, more info and proof can be found here:<br />
<a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=506573">http://www.gamedev.net/community/forums/topic.asp?topic_id=506573</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Please share:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS%26amp%3Bbodytext%3DStarting%2520with%2520DirectX%2520Pixel%2520Shader%2520Model%25203.0%2520there%2520exist%2520an%2520input%2520type%2520called%2520VPOS.%2520It%2527s%2520the%2520current%2520pixels%2520position%2520on%2520the%2520screen%2520and%2520it%2527s%2520automatically%2520generated.%2520This%2520can%2520be%2520useful%2520when%2520sampling%2520from%2520a%2520previously%2520rendered%2520texture%2520when%2520rendering%2520an';" title="Digg"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="sphinn" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F';" title="Sphinn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS%26amp%3Bnotes%3DStarting%2520with%2520DirectX%2520Pixel%2520Shader%2520Model%25203.0%2520there%2520exist%2520an%2520input%2520type%2520called%2520VPOS.%2520It%2527s%2520the%2520current%2520pixels%2520position%2520on%2520the%2520screen%2520and%2520it%2527s%2520automatically%2520generated.%2520This%2520can%2520be%2520useful%2520when%2520sampling%2520from%2520a%2520previously%2520rendered%2520texture%2520when%2520rendering%2520an';" title="del.icio.us"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Bt%3DVPOS';" title="Facebook"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx" href="javascript:window.location='http%3A%2F%2Fwww.mixx.com%2Fsubmit%3Fpage_url%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS';" title="Mixx"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS%26amp%3Bannotation%3DStarting%2520with%2520DirectX%2520Pixel%2520Shader%2520Model%25203.0%2520there%2520exist%2520an%2520input%2520type%2520called%2520VPOS.%2520It%2527s%2520the%2520current%2520pixels%2520position%2520on%2520the%2520screen%2520and%2520it%2527s%2520automatically%2520generated.%2520This%2520can%2520be%2520useful%2520when%2520sampling%2520from%2520a%2520previously%2520rendered%2520texture%2520when%2520rendering%2520an';" title="Google Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="current" href="javascript:window.location='http%3A%2F%2Fcurrent.com%2Fclipper.htm%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS';" title="Current"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="linkedin" href="javascript:window.location='http%3A%2F%2Fwww.linkedin.com%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS%26amp%3Bsource%3DGame%2BRendering%2B%26amp%3Bsummary%3DStarting%2520with%2520DirectX%2520Pixel%2520Shader%2520Model%25203.0%2520there%2520exist%2520an%2520input%2520type%2520called%2520VPOS.%2520It%2527s%2520the%2520current%2520pixels%2520position%2520on%2520the%2520screen%2520and%2520it%2527s%2520automatically%2520generated.%2520This%2520can%2520be%2520useful%2520when%2520sampling%2520from%2520a%2520previously%2520rendered%2520texture%2520when%2520rendering%2520an';" title="LinkedIn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="live" href="javascript:window.location='https%3A%2F%2Ffavorites.live.com%2Fquickadd.aspx%3Fmarklet%3D1%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS';" title="Live"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="myspace" href="javascript:window.location='http%3A%2F%2Fwww.myspace.com%2FModules%2FPostTo%2FPages%2F%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Bt%3DVPOS';" title="MySpace"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="netvibes" href="javascript:window.location='http%3A%2F%2Fwww.netvibes.com%2Fshare%3Ftitle%3DVPOS%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F';" title="Netvibes"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS';" title="StumbleUpon"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="twitter" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DVPOS%2520-%2520http%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F';" title="Twitter"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit" href="javascript:window.location='http%3A%2F%2Freddit.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Btitle%3DVPOS';" title="Reddit"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F';" title="Technorati"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F12%252F07%252Fvpos%252F%26amp%3Bt%3DVPOS%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DStarting%2520with%2520DirectX%2520Pixel%2520Shader%2520Model%25203.0%2520there%2520exist%2520an%2520input%2520type%2520called%2520VPOS.%2520It%2527s%2520the%2520current%2520pixels%2520position%2520on%2520the%2520screen%2520and%2520it%2527s%2520automatically%2520generated.%2520This%2520can%2520be%2520useful%2520when%2520sampling%2520from%2520a%2520previously%2520rendered%2520texture%2520when%2520rendering%2520an';" title="Yahoo! Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.gamerendering.com/2009/12/07/vpos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Render Thickness</title>
		<link>http://www.gamerendering.com/2009/09/25/render-thickness/</link>
		<comments>http://www.gamerendering.com/2009/09/25/render-thickness/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 14:24:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rendering Methods]]></category>
		<category><![CDATA[Billboards]]></category>
		<category><![CDATA[Clouds]]></category>
		<category><![CDATA[Hebe]]></category>
		<category><![CDATA[Render-to-Texture]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[Thickness]]></category>

		<guid isPermaLink="false">http://www.gamerendering.com/?p=710</guid>
		<description><![CDATA[In [1] they describe a clever way of rendering the thickness of an object in a single pass. The method only correctly works for convex objects but this limitation isn&#8217;t that bad, the method can often be used to get the approximated thickness of concave objects as well. For example, [1] uses it to fake [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0cm;">In [1] they describe a clever way of rendering the thickness of an object in a single pass. The method only correctly works for convex objects but this limitation isn&#8217;t that bad, the method can often be used to get the approximated thickness of concave objects as well. For example, [1] uses it to fake the light scattering in clouds rendered as billboards. The methods works like this:</p>
<p style="margin-bottom: 0cm;">The object is rendered and the distance from the near plane is saved in a color channel R. Also, the distance to the far plane is saved in channel G. By rendering with the blend color mode MIN, one will get the minimum distance from the near plane in R, and the minimum distance to the far plane in G. By using these two distances, one can easily calculate the thickness of the rendered object with the following formula (1-G) – R (if distance is scaled so one is the the distance between the clip planes). Alpha can be saved as well in the same render pass, by outputting it to the A channel. And selecting blend alpha mode ADD (color and alpha can have different modes). This will add up the alpha.</p>
<p style="margin-bottom: 0cm;">All this is done in only one pass. Just remember to clear to white before rendering.</p>
<p>The image below shows the thickness of the popular Hebe mesh rendered with this method. This model is not convex, and the problem areas are for example the arm holding the bowl. As one can see, the algorithm believes that the bowl and the shoulder are connected, and therefore believes that part of the object is the thickest.</p>
<p><a href="http://www.gamerendering.com/wp-content/uploads/Hebe.JPG"><img class="size-full wp-image-711" title="Hebe" src="http://www.gamerendering.com/wp-content/uploads/Hebe.JPG" alt="Hebe" width="328" height="493" /></a></p>
<p>[1] The Art and Technology of Whiteout<br />
<a href="http://ati.amd.com/developer/gdc/2007/ArtAndTechnologyOfWhiteout(Siggraph07).pdf">http://ati.amd.com/developer/gdc/2007/ArtAndTechnologyOfWhiteout(Siggraph07).pdf</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Please share:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness%26amp%3Bbodytext%3DIn%2520%255B1%255D%2520they%2520describe%2520a%2520clever%2520way%2520of%2520rendering%2520the%2520thickness%2520of%2520an%2520object%2520in%2520a%2520single%2520pass.%2520The%2520method%2520only%2520correctly%2520works%2520for%2520convex%2520objects%2520but%2520this%2520limitation%2520isn%2527t%2520that%2520bad%252C%2520the%2520method%2520can%2520often%2520be%2520used%2520to%2520get%2520the%2520approximated%2520thickness%2520of%2520conca';" title="Digg"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="sphinn" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F';" title="Sphinn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness%26amp%3Bnotes%3DIn%2520%255B1%255D%2520they%2520describe%2520a%2520clever%2520way%2520of%2520rendering%2520the%2520thickness%2520of%2520an%2520object%2520in%2520a%2520single%2520pass.%2520The%2520method%2520only%2520correctly%2520works%2520for%2520convex%2520objects%2520but%2520this%2520limitation%2520isn%2527t%2520that%2520bad%252C%2520the%2520method%2520can%2520often%2520be%2520used%2520to%2520get%2520the%2520approximated%2520thickness%2520of%2520conca';" title="del.icio.us"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Bt%3DRender%2520Thickness';" title="Facebook"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx" href="javascript:window.location='http%3A%2F%2Fwww.mixx.com%2Fsubmit%3Fpage_url%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness';" title="Mixx"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness%26amp%3Bannotation%3DIn%2520%255B1%255D%2520they%2520describe%2520a%2520clever%2520way%2520of%2520rendering%2520the%2520thickness%2520of%2520an%2520object%2520in%2520a%2520single%2520pass.%2520The%2520method%2520only%2520correctly%2520works%2520for%2520convex%2520objects%2520but%2520this%2520limitation%2520isn%2527t%2520that%2520bad%252C%2520the%2520method%2520can%2520often%2520be%2520used%2520to%2520get%2520the%2520approximated%2520thickness%2520of%2520conca';" title="Google Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="current" href="javascript:window.location='http%3A%2F%2Fcurrent.com%2Fclipper.htm%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness';" title="Current"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="linkedin" href="javascript:window.location='http%3A%2F%2Fwww.linkedin.com%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness%26amp%3Bsource%3DGame%2BRendering%2B%26amp%3Bsummary%3DIn%2520%255B1%255D%2520they%2520describe%2520a%2520clever%2520way%2520of%2520rendering%2520the%2520thickness%2520of%2520an%2520object%2520in%2520a%2520single%2520pass.%2520The%2520method%2520only%2520correctly%2520works%2520for%2520convex%2520objects%2520but%2520this%2520limitation%2520isn%2527t%2520that%2520bad%252C%2520the%2520method%2520can%2520often%2520be%2520used%2520to%2520get%2520the%2520approximated%2520thickness%2520of%2520conca';" title="LinkedIn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="live" href="javascript:window.location='https%3A%2F%2Ffavorites.live.com%2Fquickadd.aspx%3Fmarklet%3D1%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness';" title="Live"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="myspace" href="javascript:window.location='http%3A%2F%2Fwww.myspace.com%2FModules%2FPostTo%2FPages%2F%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Bt%3DRender%2520Thickness';" title="MySpace"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="netvibes" href="javascript:window.location='http%3A%2F%2Fwww.netvibes.com%2Fshare%3Ftitle%3DRender%2520Thickness%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F';" title="Netvibes"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness';" title="StumbleUpon"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="twitter" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DRender%2520Thickness%2520-%2520http%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F';" title="Twitter"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit" href="javascript:window.location='http%3A%2F%2Freddit.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Btitle%3DRender%2520Thickness';" title="Reddit"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F';" title="Technorati"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F25%252Frender-thickness%252F%26amp%3Bt%3DRender%2520Thickness%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DIn%2520%255B1%255D%2520they%2520describe%2520a%2520clever%2520way%2520of%2520rendering%2520the%2520thickness%2520of%2520an%2520object%2520in%2520a%2520single%2520pass.%2520The%2520method%2520only%2520correctly%2520works%2520for%2520convex%2520objects%2520but%2520this%2520limitation%2520isn%2527t%2520that%2520bad%252C%2520the%2520method%2520can%2520often%2520be%2520used%2520to%2520get%2520the%2520approximated%2520thickness%2520of%2520conca';" title="Yahoo! Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.gamerendering.com/2009/09/25/render-thickness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Instanced Billboards</title>
		<link>http://www.gamerendering.com/2009/09/23/instanced-billboards/</link>
		<comments>http://www.gamerendering.com/2009/09/23/instanced-billboards/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 11:27:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Particle Systems]]></category>
		<category><![CDATA[Billboards]]></category>
		<category><![CDATA[Instancing]]></category>
		<category><![CDATA[Particle]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[Shader Model]]></category>

		<guid isPermaLink="false">http://www.gamerendering.com/?p=702</guid>
		<description><![CDATA[In DirectX9, one can use instanced billboards to render lots of particles with good performance. Since we presume all particles to be billboards constructed from two triangles forming a quad, by using instancing, we can reuse this geometry data (only uv-coordinates needed) for each particle and therefore saving bandwidth. When rendering, two streams with different frequency should [...]]]></description>
			<content:encoded><![CDATA[<p>In DirectX9, one can use instanced billboards to render lots of particles with good performance. Since we presume all particles to be billboards constructed from two triangles forming a quad, by using instancing, we can reuse this geometry data (only uv-coordinates needed) for each particle and therefore saving bandwidth. When rendering, two streams with different frequency should be used.  The quad-geometry data makes the first stream, the second stream consists of the per instance data that is unique for each particle. This instance data could be the position, rotation, color and more. The big drawback with this rendering approach is that it requires hardware instancing support, which means Shader Model 3.0. (or Shader Model 2.0 for ATI cards if using a trick described in the first source below).</p>
<p>This particle rendering approach described in details:<br />
<a href="http://zeuxcg.blogspot.com/2007/09/particle-rendering-revisited.html">http://zeuxcg.blogspot.com/2007/09/particle-rendering-revisited.html</a></p>
<p>DirectX9 info about rendering multiple streams<br />
<a href="http://msdn.microsoft.com/en-us/library/bb147299(VS.85).aspx">http://msdn.microsoft.com/en-us/library/bb147299(VS.85).aspx</a></p>
<p>DirectX9 instancing info<br />
<a href="http://msdn.microsoft.com/en-us/library/bb173349(VS.85).aspx">http://msdn.microsoft.com/en-us/library/bb173349(VS.85).aspx</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Please share:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow" id="print" href="javascript:window.location='http%3A%2F%2Fwww.printfriendly.com%2Fprint%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Bpartner%3Dsociable';" title="Print this article!"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="digg" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards%26amp%3Bbodytext%3DIn%2520DirectX9%252C%2520one%2520can%2520use%2520instanced%2520billboards%2520to%2520render%2520lots%2520of%2520particles%2520with%2520good%2520performance.%2520Since%2520we%2520presume%2520all%2520particles%2520to%2520be%2520billboards%2520constructed%2520from%2520two%2520triangles%2520forming%2520a%2520quad%252C%2520by%2520using%2520instancing%252C%2520we%2520can%2520reuse%2520this%2520geometry%2520data%2520%2528only';" title="Digg"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="sphinn" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F';" title="Sphinn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="del.icio.us" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards%26amp%3Bnotes%3DIn%2520DirectX9%252C%2520one%2520can%2520use%2520instanced%2520billboards%2520to%2520render%2520lots%2520of%2520particles%2520with%2520good%2520performance.%2520Since%2520we%2520presume%2520all%2520particles%2520to%2520be%2520billboards%2520constructed%2520from%2520two%2520triangles%2520forming%2520a%2520quad%252C%2520by%2520using%2520instancing%252C%2520we%2520can%2520reuse%2520this%2520geometry%2520data%2520%2528only';" title="del.icio.us"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="facebook" href="javascript:window.location='http%3A%2F%2Fwww.facebook.com%2Fshare.php%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Bt%3DInstanced%2520Billboards';" title="Facebook"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="mixx" href="javascript:window.location='http%3A%2F%2Fwww.mixx.com%2Fsubmit%3Fpage_url%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards';" title="Mixx"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="google" href="javascript:window.location='http%3A%2F%2Fwww.google.com%2Fbookmarks%2Fmark%3Fop%3Dedit%26amp%3Bbkmk%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards%26amp%3Bannotation%3DIn%2520DirectX9%252C%2520one%2520can%2520use%2520instanced%2520billboards%2520to%2520render%2520lots%2520of%2520particles%2520with%2520good%2520performance.%2520Since%2520we%2520presume%2520all%2520particles%2520to%2520be%2520billboards%2520constructed%2520from%2520two%2520triangles%2520forming%2520a%2520quad%252C%2520by%2520using%2520instancing%252C%2520we%2520can%2520reuse%2520this%2520geometry%2520data%2520%2528only';" title="Google Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="current" href="javascript:window.location='http%3A%2F%2Fcurrent.com%2Fclipper.htm%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards';" title="Current"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="linkedin" href="javascript:window.location='http%3A%2F%2Fwww.linkedin.com%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards%26amp%3Bsource%3DGame%2BRendering%2B%26amp%3Bsummary%3DIn%2520DirectX9%252C%2520one%2520can%2520use%2520instanced%2520billboards%2520to%2520render%2520lots%2520of%2520particles%2520with%2520good%2520performance.%2520Since%2520we%2520presume%2520all%2520particles%2520to%2520be%2520billboards%2520constructed%2520from%2520two%2520triangles%2520forming%2520a%2520quad%252C%2520by%2520using%2520instancing%252C%2520we%2520can%2520reuse%2520this%2520geometry%2520data%2520%2528only';" title="LinkedIn"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="live" href="javascript:window.location='https%3A%2F%2Ffavorites.live.com%2Fquickadd.aspx%3Fmarklet%3D1%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards';" title="Live"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="myspace" href="javascript:window.location='http%3A%2F%2Fwww.myspace.com%2FModules%2FPostTo%2FPages%2F%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Bt%3DInstanced%2520Billboards';" title="MySpace"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="netvibes" href="javascript:window.location='http%3A%2F%2Fwww.netvibes.com%2Fshare%3Ftitle%3DInstanced%2520Billboards%26amp%3Burl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F';" title="Netvibes"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="stumbleupon" href="javascript:window.location='http%3A%2F%2Fwww.stumbleupon.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards';" title="StumbleUpon"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="twitter" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DInstanced%2520Billboards%2520-%2520http%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F';" title="Twitter"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="reddit" href="javascript:window.location='http%3A%2F%2Freddit.com%2Fsubmit%3Furl%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Btitle%3DInstanced%2520Billboards';" title="Reddit"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow" id="technorati" href="javascript:window.location='http%3A%2F%2Ftechnorati.com%2Ffaves%3Fadd%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F';" title="Technorati"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow" id="yahoo! bookmarks" href="javascript:window.location='http%3A%2F%2Fbookmarks.yahoo.com%2Ftoolbar%2Fsavebm%3Fu%3Dhttp%253A%252F%252Fwww.gamerendering.com%252F2009%252F09%252F23%252Finstanced-billboards%252F%26amp%3Bt%3DInstanced%2520Billboards%26opener%3Dbm%26amp%3Bei%3DUTF-8%26amp%3Bd%3DIn%2520DirectX9%252C%2520one%2520can%2520use%2520instanced%2520billboards%2520to%2520render%2520lots%2520of%2520particles%2520with%2520good%2520performance.%2520Since%2520we%2520presume%2520all%2520particles%2520to%2520be%2520billboards%2520constructed%2520from%2520two%2520triangles%2520forming%2520a%2520quad%252C%2520by%2520using%2520instancing%252C%2520we%2520can%2520reuse%2520this%2520geometry%2520data%2520%2528only';" title="Yahoo! Bookmarks"><img src="http://www.gamerendering.com/wp-content/plugins/sociable/images/yahoomyweb.png" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.gamerendering.com/2009/09/23/instanced-billboards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
