<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Eraser85's Corner</title>
	<atom:link href="http://eraser85.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://eraser85.wordpress.com</link>
	<description>Replace me with something cool already said by someone else ;)</description>
	<lastBuildDate>Mon, 19 Jan 2009 11:28:54 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='eraser85.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/a9d5f66b90265cd1b3cfd81885f5255d?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Eraser85's Corner</title>
		<link>http://eraser85.wordpress.com</link>
	</image>
			<item>
		<title>How to count total lines of code in VS.NET</title>
		<link>http://eraser85.wordpress.com/2009/01/19/how-to-count-total-lines-of-code-in-vsnet/</link>
		<comments>http://eraser85.wordpress.com/2009/01/19/how-to-count-total-lines-of-code-in-vsnet/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 11:28:54 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=27</guid>
		<description><![CDATA[I&#8217;ve found this little neat string that can be used in the VS.NET integrated Find and gives your current project / solution / file total line count:
^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+
To use it, just press CTRL+SHIFT+F, then select Use Regular Expressions and finally write the file extensions in which you want to count the lines of code.  

The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=27&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://blog.schuager.com/2009/01/line-count-in-visual-studio.html" target="_blank">I&#8217;ve found</a> this little neat string that can be used in the VS.NET integrated Find and gives your current project / solution / file total line count:</p>
<blockquote><p><span style="font-family:courier new;">^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+</span></p></blockquote>
<p>To use it, just press <span style="color:#5fd019;"><strong>CTRL+SHIFT+F</strong></span>, then select <strong><span style="color:#5fd019;">Use Regular Expressions</span></strong> and finally write the file extensions in which you want to count the lines of code. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img class="aligncenter" title="Search result window displaying total number of lines" src="http://2.bp.blogspot.com/_IqjkFvf2cS4/SWSWkwXc2VI/AAAAAAAAAFE/SLzlsoEHGFU/s400/linecount.png" alt="" width="400" height="50" /></p>
<p>The results will be displayed at the <span style="color:#5fd019;">Find result window</span>&#8217;s end.</p>
<p class="title">Thanks go to <a href="http://blog.schuager.com/">Germán Schuager</a> for the tip.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=27&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2009/01/19/how-to-count-total-lines-of-code-in-vsnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://2.bp.blogspot.com/_IqjkFvf2cS4/SWSWkwXc2VI/AAAAAAAAAFE/SLzlsoEHGFU/s400/linecount.png" medium="image">
			<media:title type="html">Search result window displaying total number of lines</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple OpenGL rendering contexts</title>
		<link>http://eraser85.wordpress.com/2008/07/16/multiple-opengl-rendering-contexts/</link>
		<comments>http://eraser85.wordpress.com/2008/07/16/multiple-opengl-rendering-contexts/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 09:33:42 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[multiple rendering contexts]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[textures]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=25</guid>
		<description><![CDATA[Hi all. Currently I&#8217;m working on a software which &#8220;should&#8221; have different OpenGL areas, each drawn in a different window or a more generic drawable surface (a panel, a group box, etc.. anything that has a window handle in practice).
But what I&#8217;m facing is demotivating me  
From what I&#8217;m reading, if you loose an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=25&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi all. Currently I&#8217;m working on a software which &#8220;should&#8221; have different OpenGL areas, each drawn in a different window or a more generic drawable surface (a panel, a group box, etc.. anything that has a window handle in practice).</p>
<p>But what I&#8217;m facing is demotivating me <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>From <a title="OpenGL rendering" href="http://osdl.sourceforge.net/main/documentation/rendering/SDL-openGL.html#textures" target="_blank">what I&#8217;m reading</a>, if you loose an OpenGL context, you also loose anything associated with it (textures, state changes, etc..):</p>
<blockquote><p>This means that all the GL state is destroyed with it. This includes textures, among other things. More precisely, on Windows the textures are corrupted, whereas Linux handles it correctly.</p></blockquote>
<p>Actually, in my application, I have different contexts and simply switch between them thanks to the wglMakeCurrent and everything works fine as long as I just render polygons with glColor.</p>
<p>But as I try to apply a texture (loaded with SDL_Image) nothing happens. So I tried to dump the texture raw data to a file and open it with PhotoShop but the resulting image is completely gray (205/255) <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_neutral.gif' alt=':|' class='wp-smiley' /> </p>
<p>I thought it could be the loosing-context problem mentioned above, so I tried to dump the texture as soon as I upload the data in it with glTexImage2D but I got the same gray image as before. Just to be sure I checked that SDL_Image was loading the texture correctly and that was the case&#8230;</p>
<p>I still have to check a couple of things&#8230; If you have some tips, please share them with me!</p>
<p>Bye</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=25&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/07/16/multiple-opengl-rendering-contexts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>My brand new Nikon D60</title>
		<link>http://eraser85.wordpress.com/2008/05/17/my-brand-new-nikon-d60/</link>
		<comments>http://eraser85.wordpress.com/2008/05/17/my-brand-new-nikon-d60/#comments</comments>
		<pubDate>Sat, 17 May 2008 10:14:02 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[D60]]></category>
		<category><![CDATA[dslr]]></category>
		<category><![CDATA[nikon]]></category>
		<category><![CDATA[reflex]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=23</guid>
		<description><![CDATA[Hi there,
a few days ago I finally decided to get a reflex digital SLR. At first, I was undecided between Canon 400D and Nikon D40x. After reading online reviews, I ended up choosing the latter.
One of the &#8220;features&#8221; I most appreciated from the D40x was the grain noise at high ISOs. While the D40x produced [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=23&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi there,</p>
<p>a few days ago I finally decided to get a reflex digital SLR. At first, I was undecided between Canon 400D and Nikon D40x. After reading online reviews, I ended up choosing the latter.</p>
<p>One of the &#8220;features&#8221; I most appreciated from the D40x was the grain noise at high ISOs. While the D40x produced a slightly noisier image, this kind of noise is almost monochromatic, like using an high sensitive film on a classic SLR; on the other hand, the 400D produces a more &#8220;colorf<a href="http://eraser85.files.wordpress.com/2008/05/nikon-canon.jpg"><img class="alignright size-thumbnail wp-image-24" src="http://eraser85.files.wordpress.com/2008/05/nikon-canon.jpg?w=124&#038;h=96" alt="Noise Comparison" width="124" height="96" /></a>ul&#8221; noise.</p>
<p>One day I was passing by a shop nearby my house and saw the D40x at a very competitive price (compared to several online shops), so I asked if it was possible to not get the 18-55mm kit and instead getting just the body with the nice 18-135mm lens. The main reason I didn&#8217;t wanted the kit was the lack of image stabilization.</p>
<p>After a bit of talks, the shopkeeper asked me if I was interested in the newer Nikon D60, which was due to arrive in his shop in a couple of days. The D60 kit includes two stabilized lenses, an AF-S 18-55mm VR and an AF-S 55-200mm VR ED. Intrigued for both the price AND the lenses, I decided to wait for the D60 so I could take a closer look at it.</p>
<p>While I was waiting for the camera to arrive, I read a couple of online reviews, <a title="Nikon D60 review" href="http://www.dpreview.com/reviews/nikond60/" target="_blank">expecially the one from dpreview.com</a>, which helped me a lot deciding for what I was going to buy.</p>
<p>Infact, as the guy from the shop told me the camera was arrived, I went there almost convinced to take it. Once there, he explained me that the camera body had three-years warranty, while each lens had an extraordinary 4-years warranty! Amazed by the build quality, the body&#8217; size and weight.. I ended up buying it <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>In the days following I started enjoying the camera and, even beeing the very first time for me using a reflex, I was surprised by the results. You can see them too in my flickr page (I also bought the pro upgrade in flickr, so no more limitations with sets, image sizes, etc..).</p>
<p>I hope to rapidly increase my shooting expertise, I really like taking photos <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Bye!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=23&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/05/17/my-brand-new-nikon-d60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/05/nikon-canon.jpg?w=124" medium="image">
			<media:title type="html">Noise Comparison</media:title>
		</media:content>
	</item>
		<item>
		<title>The Wild Italy Expo&#8217; 2008</title>
		<link>http://eraser85.wordpress.com/2008/05/11/the-wild-italy-expo-2008/</link>
		<comments>http://eraser85.wordpress.com/2008/05/11/the-wild-italy-expo-2008/#comments</comments>
		<pubDate>Sun, 11 May 2008 22:16:31 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[animals]]></category>
		<category><![CDATA[expo]]></category>
		<category><![CDATA[italy]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[reptiles]]></category>
		<category><![CDATA[snakes]]></category>
		<category><![CDATA[spiders]]></category>
		<category><![CDATA[wild]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=22</guid>
		<description><![CDATA[Hi there!
New photos have been added to my flickr.com account. This time are from the Wild Italy Expo&#8217; 2008 edition. Hope you will enjoy them   Bye!
PS: here&#8217;s the link to the set
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=22&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi there!</p>
<p>New photos have been added to my flickr.com account. This time are from the Wild Italy Expo&#8217; 2008 edition. Hope you will enjoy them <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Bye!</p>
<p>PS: here&#8217;s the <a title="Wild Italy Expo 2008" href="http://www.flickr.com/photos/blazor85/sets/72157603148596497/" target="_blank">link</a> to the set</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=22&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/05/11/the-wild-italy-expo-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Input / Output with GPUs</title>
		<link>http://eraser85.wordpress.com/2008/05/01/input-output-with-gpus/</link>
		<comments>http://eraser85.wordpress.com/2008/05/01/input-output-with-gpus/#comments</comments>
		<pubDate>Thu, 01 May 2008 19:28:59 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[gpu io]]></category>
		<category><![CDATA[render monkey]]></category>
		<category><![CDATA[rm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=21</guid>
		<description><![CDATA[It has been a while since my last blog post. Anyway, talking with Junskyman about the Translucent Shadow Map technique, a problem aroused: how do the GPU handles data within textures?
Before dealing with this, it might be better starting with the basics: let&#8217;s then talk about Input / Output with GPUs.
When you define a texture, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=21&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It has been a while since my last blog post. Anyway, talking with Junskyman about the <a href="http://eraser85.wordpress.com/2008/02/28/make-it-translucid/" target="_blank">Translucent Shadow Map</a> technique, a problem aroused: how do the GPU handles data within textures?</p>
<p>Before dealing with this, it might be better starting with the basics: let&#8217;s then talk about Input / Output with GPUs.</p>
<p>When you define a texture, you also specify it&#8217;s Format, Internal Format and expecially it&#8217;s <span style="color:#339966;"><em>type</em></span>:</p>
<p style="padding-left:30px;"><em><span style="color:#3366ff;">glTexImage2D</span>( target, level, <span style="color:#ff6600;">iFormat</span>, w, h, border, <span style="color:#ff6600;">format</span>, <span style="color:#339966;">type</span>, *data );</em></p>
<p>with the <span style="color:#ff6600;">InternalFormat</span> you basically define how many channels are being used in that texture, while <span style="color:#ff6600;">format</span> specifies the format of the input data defined in *data.</p>
<p><span style="color:#339966;">Type</span>, however, tells the OpenGL pipeline how the data associated with the texture is to be treated.</p>
<p>From now on one could decide to work exclusively on GPU thanks to shaders, or instead allowing the CPU to handle some of the operations.</p>
<p>As for the CPU/GPU approach, usually getting data from GPU is done by glReadPixels(). It copies the texture data located in the VRam into an array. Pay attention that if the array&#8217;s type differs from texture&#8217;s <span style="color:#339966;">type</span>, will result in artifacts and wrong data being read. Usually, with floating point textures, there are no restrictions in the output values (they can be both positive or negative).</p>
<p>Integer texture type, instead, forces data to be converted from floating point (if that&#8217;s the case with original data stored in VRam) to Unsigned Integer. Negative or greater than 8bit values are simply clamped in 0 &#8230; 2^8 range.</p>
<p>The same thing applies with data processed using the shaders-only approach, but in this case are also normalized in -1.0 &#8230; 1.0 range. But, let&#8217;s say we want to transfer negative data using integer textures. In this case, we simply have to map the original values according to the following equation:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">vec4</span> convData = origData * 0.5 + 0.5;</p>
<p>A weird thing happened while using RenderMonkey, however. In RM, even if you set texture type to GL_RGBA32F, assigning negative data results in clamping. Therefore, compacting data in 0.0 &#8230; 1.0 range and then scale it back to -1.0 &#8230; 1.0 range is mandatory.</p>
<p>In my past tutorial I made some changes to the source code, removing this conversion since it should not be needed in a real world application.</p>
<p>At the end, my advice is simple though: always pay attention to the range of values your data have at any time, and use fewer conversions as possible, since it always introduces errors.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=21&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/05/01/input-output-with-gpus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Make it translucid! (Part Three)</title>
		<link>http://eraser85.wordpress.com/2008/04/04/make-it-translucid-part-three/</link>
		<comments>http://eraser85.wordpress.com/2008/04/04/make-it-translucid-part-three/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 10:35:33 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[shaders]]></category>
		<category><![CDATA[translucent shadow maps]]></category>
		<category><![CDATA[tsm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=17</guid>
		<description><![CDATA[Finally the third and final part of this tutorial.
In the first one we focused on the TSM creation, then in the second one we saw the translucency&#8217;s multiple scattering contribution. In this final part, we are going to see how to filter the TSM.
The main idea with TSM is that the more the object is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=17&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Finally the third and final part of this tutorial.</p>
<p>In the first one we focused on the TSM creation, then in the second one we saw the translucency&#8217;s multiple scattering contribution. In this final part, we are going to see how to filter the TSM.</p>
<p>The main idea with TSM is that the more the object is &#8220;thick&#8221;, consequently the less the light will be able to pass through it. Another important idea with TSM is that since light (once penetrated the material) scatters in pseudo-random direction, can leave the object from a point that do not coincides with the point from where the light entered.</p>
<p>In order to simulate the first behaviour, one can simply read the Z coordinate from one vertex in light space (we can call it Xin) and then compare with the Z from another point (taken by the camera, but then projected in light space &#8211; called Xout). Obviously, Xout have to be on the same line that ideally connects the light source with Xin: this means Xout.XY must be equal to Xin.XY. Then, the only difference between those two points will lie in the Z value: by arbitrarily choosing Xout and projecting it in light space, Xin is simply taken by reading the content of the TSM in Xout.XY!</p>
<div style="text-align:center;"><img src="http://eraser85.files.wordpress.com/2008/04/immagine-1.png" alt="TSM thickness idea" /></div>
<p>That&#8217;s what basically has been discussed in the second part. The thickness is computed and used to modulate light intensity in the Rd function: the latter however does not take into account the scattering: it&#8217;s like the light enters one point, then it simply &#8220;fly&#8221; through the object in a straight line, and finally leaves it exactly in the same direction as when entered the material.</p>
<p>This problem is solved in this final part (thus implementing the second idea of TSM) by simulating pseudo-random scattering through filtering. Filtering an image basically consists in taking the whole image and then apply some sort of algorithm to produce the final result. In this case we need to simulate the scattering: simplifying this behaviour in order to make the algorithm real-time friendly is done by taking into account not only the point where the light enters or leaves, but also its neighbours. The more the neighbour are far from the original point, the less they will contribute to the final result.</p>
<p>One can implement filtering by following any schema, even though I&#8217;ve found the one from the Dachsbacher&#8217;s 2003 paper being of high quality (and a little heavy on the GPU <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ). A graphical representation can be seen in the following image, consisting in a 21-samples schema:</p>
<div style="text-align:center;"><img src="http://eraser85.files.wordpress.com/2008/04/immagine-2.png" alt="TSM Filtering Schema" /></div>
<p>The code used to implement the filtering is just too long to be posted here, so I decided to post the most important parts of it.</p>
<blockquote><p><font color="#ff0000">Filtering the TSM </font></p>
<p><font color="#0000ff">vec4</font> filter21 (<font color="#0000ff">vec4</font> Xout)</p>
<p>{</p>
<p><font color="#0000ff">   const float</font> d = 1.0/1024.0;</p>
<p><font color="#0000ff">   vec4</font> finalColor = <font color="#0000ff">vec4</font>(0.0,0.0,0.0,0.0);</p>
<p><font color="#0000ff">   vec4</font> Xin;</p>
<p><font color="#339966">   //</font></p>
<p><font color="#0000ff">   float</font> v0 = tsm_smoothness*1.0;</p>
<p><font color="#0000ff">   float</font> v1 = tsm_smoothness*2.0;</p>
<p><font color="#0000ff">   float</font> v2 = tsm_smoothness*3.0;</p>
<p><font color="#0000ff">   float</font> k0 = 0.05556; <font color="#339966">// 1.0/18.0</font></p>
<p><font color="#0000ff">   float</font> k1 = 0.04167; <font color="#339966">// 1.0/24.0</font></p>
<p><font color="#0000ff">   float</font> k2 = 0.04167; <font color="#339966">// 1.0/24.0</font></p>
<p><font color="#339966">   //</font></p>
<p><font color="#000000">   Xin</font> = Xout;</p>
<p><font color="#000000">   finalColor</font> = multipleScattering(Xin,Xout, v0)*k0;</p>
<p><font color="#000000">   Xin.y</font> = Xout.y + d;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v0)*k0;</p>
<p><font color="#000000">   Xin.y</font> = Xout.y + d + d;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x;</p>
<p><font color="#339966">   //</font></p>
<p><font color="#000000">     [...]</font></p>
<p><font color="#339966">   //</font></p>
<p><font color="#000000">   Xin.y</font> = Xout.y + 1.5*d;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x &#8211; 1.5*d;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v1)*k1;</p>
<p><font color="#000000">   Xin.y</font> = Xout.y + 1.5*d;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x + 1.5*d;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v1)*k1;</p>
<p><font color="#339966">   //</font></p>
<p><font color="#000000">     [...]</font></p>
<p><font color="#339966">   //</font></p>
<p><font color="#000000">   Xin.y</font> = Xout.y + 5.0*d;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v2)*k2;</p>
<p><font color="#000000">   Xin.y</font> = Xout.y;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x + 5.0*d;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v2)*k2;</p>
<p><font color="#000000">   Xin.y</font> = Xout.y &#8211; 5.0*d;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v2)*k2;</p>
<p><font color="#000000">   Xin.y</font> = Xout.y;</p>
<p><font color="#000000">   Xin.x</font> = Xout.x &#8211; 5.0*d;</p>
<p><font color="#000000">   finalColor</font> += multipleScattering(Xin,Xout, v2)*k2;</p>
<p><font color="#339966">   //</font></p>
<p><font color="#0000ff">   return</font> finalColor*tsmGainFactor;<br />
}</p></blockquote>
<p><a href="http://eraser85.files.wordpress.com/2008/04/immagine-3.png" target="_blank" title="TSM and procedural Marble combined result"><img src="http://eraser85.files.wordpress.com/2008/04/immagine-3.thumbnail.png" alt="TSM and procedural Marble combined result" align="right" /></a>A little bit of gain is added to the final color in order to increase the TSM contribution in the final rendering.</p>
<p>The whole TSM stuff is then simply called in the main function of your GLSL code through filter21(..) . In order to correctly apply the translucency, the TSM&#8217;s result color must be added up to the base color. You can further increase the final look by taking into account the clamped-to-zero N dot L product, thus simulating dark zones not directly lit by the light source; or even ambient reflections on the main model..</p>
<p>Thank you for reading my very first tutorial. I know there are some unclear parts: some were not written by purpose, in order to give you greater flexibility. Lastly, excuse me if there are some grammar errors, but I&#8217;m Italian and I do not write long posts in English from long time&#8230;</p>
<p>Bye!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=17&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/04/04/make-it-translucid-part-three/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/04/immagine-1.png" medium="image">
			<media:title type="html">TSM thickness idea</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/04/immagine-2.png" medium="image">
			<media:title type="html">TSM Filtering Schema</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/04/immagine-3.thumbnail.png" medium="image">
			<media:title type="html">TSM and procedural Marble combined result</media:title>
		</media:content>
	</item>
		<item>
		<title>Pictures of my new Macbook Pro</title>
		<link>http://eraser85.wordpress.com/2008/03/13/pictures-of-my-new-macbook-pro/</link>
		<comments>http://eraser85.wordpress.com/2008/03/13/pictures-of-my-new-macbook-pro/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 15:27:04 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[macbook pro]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=16</guid>
		<description><![CDATA[Hi all, I&#8217;ve added some pictures of my brand new Macbook Pro! Take a look at them, just click on my flickr pictures on the right..
Soon I&#8217;ll post a little review on it and the third and final part of TSM tecnique!
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=16&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Hi all, I&#8217;ve added some pictures of my brand new Macbook Pro! Take a look at them, just click on my flickr pictures on the right..</p>
<p>Soon I&#8217;ll post a little review on it and the third and final part of TSM tecnique!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=16&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/03/13/pictures-of-my-new-macbook-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Make it translucid! (Part Two)</title>
		<link>http://eraser85.wordpress.com/2008/03/03/make-it-translucid-part-two/</link>
		<comments>http://eraser85.wordpress.com/2008/03/03/make-it-translucid-part-two/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 14:00:47 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[shaders]]></category>
		<category><![CDATA[translucent shadow maps]]></category>
		<category><![CDATA[tsm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=13</guid>
		<description><![CDATA[The last time we discussed about the approximations needed to compute translucency in real time using TSM. We also created a translucent shadow map and now we are going to use it&#8230;
4 &#8211; Light diffuses through the material
The light entering the material diffuses in it according to the Rd equation (take a look at the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=13&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a href="http://eraser85.wordpress.com/2008/02/28/make-it-translucid/" title="Make It Translucid! (Part One)" target="_blank">last time</a> we discussed about the approximations needed to compute translucency in real time using TSM. We also created a translucent shadow map and now we are going to use it&#8230;</p>
<h2>4 &#8211; Light diffuses through the material</h2>
<p>The light entering the material diffuses in it according to the Rd equation <a href="http://eraser85.files.wordpress.com/2008/03/rd_equation.jpg" title="Rd Equation"><img src="http://eraser85.files.wordpress.com/2008/03/rd_equation.thumbnail.jpg" alt="Rd Equation" align="right" /></a>(take a look at the figure on the right).</p>
<p>Thanks to the TSM computed in the <a href="http://eraser85.wordpress.com/2008/02/28/make-it-translucid/" title="Make It Translucid! (Part One)" target="_blank">last article</a>, we only need two more informations: Xin and Xout. Xin represents the fragment coordinate (in light space) were light enters the material, while Xout is the point from which the light leaves the object.</p>
<p>In practice, Xout is the fragment coordinate as seen by the camera moving around the object PROJECTED in light space. Once you get the fragment coordinate from the vertex shade, you have it automatically projected in camera (or view) space: since we need to compare this with the data stored in the TSM, we must have them both in the same space (light space). The projection in light space is done by multiplying the view-space-projected coordinate by the camera&#8217;s model-view-projection matrix inverse: by doing so we get the object space coordinates, ready to be multiplied by the light&#8217;s model-view-projection matrix.</p>
<blockquote><p> <img src="http://www.cs.toronto.edu/~faisal/teaching/notes/csc418/faisal/img/sh-viewing-pipeline.gif" align="middle" height="120" width="763" /></p>
<p>OCS = Object Coordinate System</p>
<p>WCS = World Coordinate System</p>
<p>VCS = View Coordinate System</p>
<p>NDSC = Normalized Device Coordinate System</p>
<p>DCS = Device Coordinate System</p></blockquote>
<p><a href="http://eraser85.files.wordpress.com/2008/03/xinxout.jpg" target="_blank" id="file-link-15" title="Xin Xout in TSM" class="file-link image"><img src="http://eraser85.files.wordpress.com/2008/03/xinxout.thumbnail.jpg" alt="Xin Xout in TSM" align="left" /></a><a href="void(0)" id="file-link-15" title="Xin Xout in TSM" class="file-link image"> </a>Once we have projected Xout in light space, calculating Xin is just a matter of shifting Xout&#8217;s (x, y) coordinates by a delta (usually the size of a pixel &#8211; 1.0/resX and 1.0/res if you want resolution/ratio independency). In this way we can compute translucency simply by filtering the TSM previously calculated. An elegant an also pretty fast solution, if you ask! Of course, this method have some drawbacks: it assumes the object being completely convex so some errors might occur, even though them not being visually important in the majority of cases&#8230;</p>
<blockquote><p><font color="#ff0000">Rd function in GLSL:</font></p>
<p><font color="#0000ff">vec4 </font>multipleScattering (<font color="#0000ff">vec4 </font>Xin, <font color="#0000ff">vec4 </font>Xout, <font color="#0000ff">float </font>lvl)</p>
<p>{</p>
<p><font color="#0000ff">   vec4 </font>finalColor = <font color="#0000ff">vec4</font>(0.0,0.0,0.0,1.0);</p>
<p><font color="#0000ff">   float </font>e = 2.718281828459;</p>
<p><font color="#339966">   /***************************/</font></p>
<p><font color="#339966">   //irradiance, depth and normals must account for coordinate shifting!</font></p>
<p><font color="#0000ff">   vec4 </font>irradIN = <font color="#ff00ff">texture2D</font>(Irradiance, Xin.xy,lvl);</p>
<p><font color="#0000ff">   vec4 </font>depthIN = <font color="#ff00ff">texture2D</font>(DepthBuff, Xin.xy,lvl);</p>
<p><font color="#0000ff">   vec4 </font>sNormIN = <font color="#ff00ff">texture2D</font>(SNormals, Xin.xy,lvl);</p>
<p><font color="#339966">     //</font></p>
<p><font color="#0000ff">   vec4 </font>sigma_a = lightFreqAbsorbed * tsm_freqAbsorption;</p>
<p><font color="#0000ff">   vec4 </font>sigma_s = lightFreqAbsorbed * (1.5-tsm_freqAbsorption);</p>
<p><font color="#339966">     //</font></p>
<p><font color="#0000ff">   vec4 </font>extinction_coeff = (sigma_a + sigma_s);</p>
<p><font color="#0000ff">   vec4 </font>reduced_albedo = sigma_s / extinction_coeff;</p>
<p><font color="#0000ff">   vec4 </font>effective_extinction_coeff = <font color="#ff00ff">sqrt</font>(3.0 * sigma_a * extinction_coeff);</p>
<p><font color="#0000ff">   vec4 </font>D = 1.0/(3.0*extinction_coeff);</p>
<p><font color="#339966">     //</font></p>
<p><font color="#0000ff">   float </font>fresnel_diff = -(1.440/(refr_index*refr_index))+(0.710/refr_index)+0.668+(0.0636*refr_index);</p>
<p><font color="#0000ff">   float </font>A = (1.0+fresnel_diff)/(1.0-fresnel_diff);</p>
<p><font color="#339966">   //</font></p>
<p><font color="#0000ff">   vec4 </font>zr = 1.0/extinction_coeff;</p>
<p><font color="#0000ff">   vec4 </font>zv = zr + 4.0*A*D;</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   vec4 </font>xr = Xin &#8211; zr * sNormIN;</p>
<p><font color="#0000ff">   vec4 </font>xv = Xin + zv * sNormIN;</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   float </font>dr = <font color="#ff00ff">length</font>(xr &#8211; Xout);</p>
<p><font color="#0000ff">   float </font>dv = <font color="#ff00ff">length</font>(xv &#8211; Xout);</p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   vec4 </font>f1 = reduced_albedo/(4.0*3.1415296);</p>
<p><font color="#0000ff">   vec4 </font>f2 = zr * (effective_extinction_coeff * dr + 1.0);</p>
<p><font color="#0000ff">   vec4 </font>f3 = <font color="#ff00ff">pow</font>(<font color="#0000ff">vec4</font>(e) , -effective_extinction_coeff * dr) / (extinction_coeff * <font color="#ff00ff">pow</font>(dr,3.0));</p>
<p><font color="#0000ff">   vec4 </font>f4 = zv * (effective_extinction_coeff * dv + 1.0);</p>
<p><font color="#0000ff">   vec4 </font>f5 = <font color="#ff00ff">pow</font>(<font color="#0000ff">vec4</font>(e), -effective_extinction_coeff * dv) / (extinction_coeff * <font color="#ff00ff">pow</font>(dv,3.0));</p>
<p><font color="#339966">       //</font></p>
<p><font color="#000000">     finalColor = f1 * ( f2 * f3 + f4 * f5);</font></p>
<p><font color="#339966">       //</font></p>
<p><font color="#0000ff">   return </font>irradIN*finalColor;</p>
<p>}</p></blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=13&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/03/03/make-it-translucid-part-two/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/03/rd_equation.thumbnail.jpg" medium="image">
			<media:title type="html">Rd Equation</media:title>
		</media:content>

		<media:content url="http://www.cs.toronto.edu/~faisal/teaching/notes/csc418/faisal/img/sh-viewing-pipeline.gif" medium="image" />

		<media:content url="http://eraser85.files.wordpress.com/2008/03/xinxout.thumbnail.jpg" medium="image">
			<media:title type="html">Xin Xout in TSM</media:title>
		</media:content>
	</item>
		<item>
		<title>My first notebook</title>
		<link>http://eraser85.wordpress.com/2008/03/02/my-first-notebook/</link>
		<comments>http://eraser85.wordpress.com/2008/03/02/my-first-notebook/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 13:10:08 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[5920]]></category>
		<category><![CDATA[acer]]></category>
		<category><![CDATA[asus]]></category>
		<category><![CDATA[m50v]]></category>
		<category><![CDATA[macbook pro]]></category>
		<category><![CDATA[notebook]]></category>
		<category><![CDATA[penryn]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=11</guid>
		<description><![CDATA[Some days ago I&#8217;ve ordered my first notebook ever. I&#8217;m quite excited since I&#8217;ve chosen a nice beast, without sacrificing mobility: an Apple MacBook Pro. Actually, I don&#8217;t really care about MacOS even though I&#8217;m in the need for that OS to test applications I write, with different OSes and hardware configs. One of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=11&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some days ago I&#8217;ve ordered my first notebook ever. I&#8217;m quite excited since I&#8217;ve chosen a nice beast, without sacrificing mobility: an Apple MacBook Pro. Actually, I don&#8217;t really care about MacOS even though I&#8217;m in the need for that OS to test applications I write, with different OSes and hardware configs. One of the first things I&#8217;m gonna do is install WinXP since I&#8217;ve got already Vista on my desktop.</p>
<p>For all the people that might wonder what made me choose an Apple product&#8230; I just reply saying that an Apple product is just like any other product. Yes, they are quite a bit more expensive, but that&#8217;s because in commerce you ALWAYS pay more for better looking products. Always.</p>
<p>Having that said, what made me take that notebook instead of, say, a Dell or Asus product? Well, the specs. Pure and simple. What I was in the need was a notebook with:</p>
<ul>
<li>Penryn Cpu, which is both fast and energy efficient (45nm, even better if the 3MB-chached version which consumes even less)</li>
<li>nVidia 8600 with at least 256MB of dedicated VRam, or if that was not available, an 8800 (actually the 8700 is being assembled with the old productive process, wich is way less efficient)</li>
<li>A good quality screen (possibly not with TN panel), with LED back-light in order to have better contrast and be less hungry on the battery</li>
<li>As a plus, my ideal notebook would have had a BTO option for a 7200RPM hard drive (even though capacity isn&#8217;t something I&#8217;m interested in as long as it&#8217;s greater than 60GB, an SSD option whould just be too much expensive)</li>
</ul>
<p>I&#8217;ve studied all the possibile notebooks that could have met my standards, and actually there weren&#8217;t any at all. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
<p>The old base MacBook Pro had led back-lit display, 8600 (but with just 128MB vram) and no penryn.. The dell XPSes had no led back-lit displays, nor the penryn; Toshiba alternatives were even worse. The only two possible candidates were the Acer 5920 (the top version) and the Asus M50v.</p>
<p>While the latter was a good solution all around (a very nice thing was the nVidia 9500.. DX10.1 with per-MRT blending, and such..) didn&#8217;t had a very good display (just 1280 without led back-lighting); the former was similar, even though with &#8220;just&#8221; the nVidia 8600 and similarly to the M50v, no LED display (with a nice resolution of 1440 though). Actually I was more interested in the ASUS solution just because Acer products seems &#8220;cheap&#8221; or &#8220;not-so-well-made&#8221;.</p>
<p>I sweared to myself: if Apple is not going to update their pro notebooks in a couple of days (I could hold on up to Tuesday-Wednesday), I was going to take the Asus&#8217; one.</p>
<p>Fortunately Apple did the long awaited update and I took the base model, with a 7200RPM hard drive. Seeing the online reviews, I was also impressed with the display quality: it doesn&#8217;t seem to be a TN panel thanks to the high viewing angles and overall quality.</p>
<p>Now my shipment is in transit and I hope to put my hands on it on Tuesday or Wednesday at most. As it arrives, I&#8217;ll take some shoots and will discuss here the positive and negative aspects.</p>
<p>W00t!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=11&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/03/02/my-first-notebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>
	</item>
		<item>
		<title>Make it translucid! (Part One)</title>
		<link>http://eraser85.wordpress.com/2008/02/28/make-it-translucid/</link>
		<comments>http://eraser85.wordpress.com/2008/02/28/make-it-translucid/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 02:30:09 +0000</pubDate>
		<dc:creator>eraser85</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[glsl]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[shaders]]></category>
		<category><![CDATA[translucent shadow maps]]></category>
		<category><![CDATA[tsm]]></category>

		<guid isPermaLink="false">http://eraser85.wordpress.com/?p=5</guid>
		<description><![CDATA[My first post will be about OpenGL, specifically about an advanced shading tecnique proposed by C. Dachsbacher e M. Stamminger in 2003, named Translucet Shadow Maps.
As the name suggests, this tecnique is about translucency in materials. Look at your hand when is between you and a strong light source: light seems to pass through you. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=5&subd=eraser85&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img src="http://www.kycandlewaxsupply.com/GlitterGlowCandle.jpg" align="left" height="134" width="178" />My first post will be about OpenGL, specifically about an advanced shading tecnique <a href="http://portal.acm.org/citation.cfm?id=882404.882433&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=18019222&amp;CFTOKEN=22854672" target="_blank">proposed by C. Dachsbacher e M. Stamminger</a> in 2003, named <i>Translucet Shadow Maps</i>.</p>
<p>As the name suggests, this tecnique is about translucency in materials. Look at your hand when is between you and a strong light source: light seems to pass through you. Or a glass with milk, you can actually see that even though milk is opaque, light still soften its look. So light through objects: that&#8217;s what translucency is all about!</p>
<p>Simulating this effect in real time can be an heavy task. Up to now, illumination models used in games or generic 3D software used for displaying meshes in real time, have been using <i>BRDF </i>models. BRDF stands for Bidirectional Reflectance Distribution Function and it just defines illumination on a material by the amount of light reflected by the surface. There are simpler types of BRDFs, like the Phong model used by OpenGL, and more complex ones such as <a href="http://portal.acm.org/citation.cfm?id=142920.134078&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=18019222&amp;CFTOKEN=22854672" target="_blank">Ward</a> or <a href="http://portal.acm.org/citation.cfm?id=800224.806819&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=18019222&amp;CFTOKEN=22854672" target="_blank">Cook-Torrance</a> which are phisically based.</p>
<p>In both cases, those models are useful for describing in real time the majority of materials, expect the translucent ones. In those materials, light isn&#8217;t just reflected back in a diffusive and/or specular manner, it is also absorbed by the material itself, scattered inside, and then left out by a different position. This phenomenon is called Subsurface Scattering and in order to simulate it in real time, we utilize the <i>BSSRDF </i>(Bidirectional Subsurface Scattering Reflectance Distribution Function). Even though the BSSRDF is an approximation of the generic Rendering Equation <a href="http://portal.acm.org/citation.cfm?id=15902" target="_blank">proposed by James T. </a><a href="http://portal.acm.org/citation.cfm?id=15902" target="_blank">Kajiya</a> in 1986, is still too heavy to be computed in real time.</p>
<p>During my traineeship at Visual Computing Laboratory in the Italian National Research Council, we discussed a couple of possible tecniques for implementing the subsurface scattering in real time and we ended up using the Translucent Shadow Maps, which is both fast and pretty.</p>
<p>What this tecnique actually does is extending the concept of a classic shadow map, adding other useful informations in it, like the incoming irradiance and surface normals from the light point of view. Actually, to store those kind of informations we need at least two textures: one used to store the incoming irradiance (it&#8217;s colored, so we need three channels) AND the depth map, while the second is needed to store the surface normals (x, y, z, so three channels). On Shader Model 3.0 or newer we can actually do all of this in just one pass with Multiple Render Targets.</p>
<h2>1 &#8211; Creating the Depth Map</h2>
<p align="justify">That&#8217;s a simple task. Just render the geometry in light space, then save the z coordinate of each projected vertices on the texture.</p>
<p align="justify"><a href="http://eraser85.files.wordpress.com/2008/02/depthmap.jpg" target="_blank" title="Depth Map of an elephant"><img src="http://eraser85.files.wordpress.com/2008/02/depthmap.thumbnail.jpg" alt="Depth Map of an elephant" align="right" /></a></p>
<blockquote><p> <font color="#ff0000"><b>Vertex Shader:</b></font></p>
<p><font color="#0000ff">varying vec4</font> vPosLS;</p>
<p><font color="#0000ff">void </font>main(<font color="#0000ff">void</font>)<br />
{<font color="#339966"></font></p>
<p><font color="#339966">   //vertex position in light space</font></p>
<p><font color="#000000">   vPosLS</font> = <font color="#ff00ff">gl_ProjectionMatrix</font> * WorldToLight * <font color="#ff00ff">gl_Vertex</font>;</p>
<p><font color="#000000">   vPosLS /= vPosLS.wwww;</font></p>
<p><font color="#ff00ff">   gl_Position</font> = vPosLS;</p>
<p>}</p>
<p></p>
<p><font color="#ff0000"><b>Pixel Shader:</b></font></p>
<p><font color="#0000ff">void </font>main(<font color="#0000ff">void</font>)</p>
<p>{</p>
<p><font color="#ff00ff">   gl_FragColor</font> = <font color="#0000ff">vec4</font>(<font color="#0000ff">vec3</font>(vPosLS.z*.5+.5), -<font color="#ff00ff">sign</font>(<font color="#ff00ff">abs</font>(vPosLS.x)) );</p>
<p>}</p></blockquote>
<h2>2 &#8211; Compute the Irradiance Map</h2>
<p>That&#8217;s a bit tricky. The irradiance incident a surface point <img src="http://operaez.net/ltx/x_{in}" alt="Xin" style="border:0 none;" /> is scattered in the material according to the Fresnel term <img src="http://operaez.net/ltx/F_{t}" alt="Ft" style="border:0 none;" />:</p>
<p><img src="http://operaez.net/ltx/E%28x_%7B%5Cmathrm%7Bin%7D%7D%29%20=%20F_%7Bt%7D%28%5Ceta,%20%5Comega_%7B%5Cmathrm%7Bin%7D%7D%29%20%5C%7C%20N%28x_%7B%5Cmathrm%7Bin%7D%7D%29%20%5Ccdot%20%5Comega_%7B%5Cmathrm%7Bin%7D%7D%20%5C%7C%20I%28%5Comega_%7B%5Cmathrm%7Bin%7D%7D%29" alt="math formulae" style="border:0 none;" /></p>
<p>In order to compute this, we need basically:</p>
<ol>
<li>Per-pixel surface normals</li>
<li>Light incident direction (vertexPosition &#8211; lightPosition)</li>
<li>A copy of the texture applied to the model</li>
</ol>
<p>The Fresnel term <img src="http://operaez.net/ltx/F_{t}" alt="Ft" style="border:0 none;" />can be computed by the following approximation:</p>
<p><img src="http://operaez.net/mimetex/F_%7Bt%7D%20=%20%28%202%20-%20N%20%5Ccdot%20V%20%29%20+%20%5Cmu%20*%20%281%20-%20N%20%5Ccdot%20V%29" alt="fresnel term img" style="border:0 none;" /></p>
<p>Since we are observing the scene from the light point of view, V = L. Be sure to normalize both the normals and the light position!</p>
<p>The last term in the first equation is the irradiance impluse, which basically describes the intensity of the light source. Since the irradiance is wavelength dependent, multiply it by the texture image applied on the model. Varying the irradiance impulse you can control the intensity of the translucency.</p>
<div align="justify"><a href="http://eraser85.files.wordpress.com/2008/02/irradiance.jpg" target="_blank" title="irradiance.jpg"><img src="http://eraser85.files.wordpress.com/2008/02/irradiance.thumbnail.jpg" alt="irradiance.jpg" align="right" /></a></div>
<blockquote><p><b><font color="#ff0000">Vertex Shader:</font></b><font color="#0000ff"></font></p>
<p><font color="#0000ff">varying vec4</font> vPosLS;<font color="#0000ff"></font></p>
<p><font color="#0000ff">varying vec3</font> vNormLS;<font color="#0000ff"></font></p>
<p><font color="#0000ff">void </font>main(<font color="#0000ff">void</font>)<br />
{<font color="#339966"></font></p>
<p><font color="#339966">   //vertex position in light space</font></p>
<p><font color="#000000">   vPosLS</font> = <font color="#ff00ff">gl_ProjectionMatrix</font> * <font color="#000000">WorldToLight</font> * <font color="#ff00ff">gl_Vertex</font>;</p>
<p><font color="#000000">   vPosLS</font> /= vPosLS.wwww;</p>
<p><font color="#339966">   //normal direction in light space</font></p>
<p><font color="#000000">   vNormLS = (WorldToLight * </font><font color="#0000ff">vec4</font>(<font color="#ff00ff">gl_Normal</font>,0.0)).xyz;</p>
<p><font color="#ff00ff">   gl_Position</font> = vPosLS;</p>
<p>}</p>
<p></p>
<p><b><font color="#ff0000">Pixel Shader:</font></b><font color="#0000ff"></font></p>
<p><font color="#0000ff">void </font>main(<font color="#0000ff">void</font>)</p>
<p>{</p>
<p><font color="#0000ff">   vec3 </font>N = <font color="#ff00ff">normalize</font>(vNormLS);</p>
<p><font color="#0000ff">   vec3 </font>L = <font color="#ff00ff">normalize</font>(vPosLS-lightpos).xyz;</p>
<p><font color="#0000ff">   vec3 </font>V = L;  <font color="#339966">//from the light pov V==L</font></p>
<p><font color="#339966">   // Fresnel Refraction (F)</font><font color="#0000ff"></font></p>
<p><font color="#0000ff">   float </font>k = <font color="#ff00ff">pow</font>(1.0 &#8211; <font color="#ff00ff">max</font>(0.0, <font color="#ff00ff">dot</font>(N,V)), 5.0);</p>
<p><font color="#0000ff">   float </font>Ft = 1.0 &#8211; k + refr_index * k;</p>
<p><font color="#339966">   // Incident Light at surface point</font></p>
<p><font color="#0000ff">   vec3 </font>E = <font color="#0000ff">vec3</font>( Ft * <font color="#ff00ff">max</font>(0.0 , <font color="#ff00ff">dot</font>(N,L))) * irradiance_intensity;</p>
<p><font color="#339966">   //Multiply E by the color texture here</font></p>
<p><font color="#ff00ff">   gl_FragColor</font> = <font color="#0000ff">vec4</font>(E, -<font color="#ff00ff">sign</font>(<font color="#ff00ff">abs</font>(N.x)));</p>
<p>}</p></blockquote>
<h2>3 &#8211; Surface Normals</h2>
<p>Computing surface normals is also trivial: just project each vertex in light space, along with the normals, then write the latter&#8217;s coordinates as an RGB output.<br />
<a href="http://eraser85.files.wordpress.com/2008/02/normals.jpg" target="_blank" title="normals.jpg"><img src="http://eraser85.files.wordpress.com/2008/02/normals.thumbnail.jpg" alt="normals.jpg" align="right" /></a></p>
<blockquote>
<p><b><font color="#ff0000">Vertex Shader:</font></b></p>
<p><font color="#0000ff">varying vec4</font> vNormLS ;</p>
<p><font color="#0000ff">void </font>main(<font color="#0000ff">void</font>)</p>
<p>{</p>
<p><font color="#000000">     vNormLS = (WorldToLight * </font><font color="#0000ff">vec4</font>(<font color="#ff00ff">gl_Normal</font>,0.0)).xyz;</p>
<p><font color="#ff00ff">   gl_Position</font> = <font color="#ff00ff">gl_ProjectionMatrix</font> * WorldToLight * <font color="#ff00ff">gl_Vertex</font>;</p>
<p>}</p>
<p></p>
<p><font color="#ff0000"><b>Pixel Shader:</b></font></p>
<p><font color="#0000ff">void </font>main(<font color="#0000ff">void</font>)</p>
<p>{</p>
<p><font color="#ff00ff">   gl_FragColor</font> = <font color="#0000ff">vec4</font>(vNormLS*.5+.5, 1.0);</p>
<p>}</p></blockquote>
<h2></h2>
<p>To be continued.. stay tuned!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/eraser85.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/eraser85.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/eraser85.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/eraser85.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/eraser85.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/eraser85.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/eraser85.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/eraser85.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/eraser85.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/eraser85.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/eraser85.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/eraser85.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=eraser85.wordpress.com&blog=2828174&post=5&subd=eraser85&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://eraser85.wordpress.com/2008/02/28/make-it-translucid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6edc46031a1549c6e526900164f7ccce?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eraser85</media:title>
		</media:content>

		<media:content url="http://www.kycandlewaxsupply.com/GlitterGlowCandle.jpg" medium="image" />

		<media:content url="http://eraser85.files.wordpress.com/2008/02/depthmap.thumbnail.jpg" medium="image">
			<media:title type="html">Depth Map of an elephant</media:title>
		</media:content>

		<media:content url="http://operaez.net/ltx/x_{in}" medium="image">
			<media:title type="html">Xin</media:title>
		</media:content>

		<media:content url="http://operaez.net/ltx/F_{t}" medium="image">
			<media:title type="html">Ft</media:title>
		</media:content>

		<media:content url="http://operaez.net/ltx/E%28x_%7B%5Cmathrm%7Bin%7D%7D%29%20=%20F_%7Bt%7D%28%5Ceta,%20%5Comega_%7B%5Cmathrm%7Bin%7D%7D%29%20%5C%7C%20N%28x_%7B%5Cmathrm%7Bin%7D%7D%29%20%5Ccdot%20%5Comega_%7B%5Cmathrm%7Bin%7D%7D%20%5C%7C%20I%28%5Comega_%7B%5Cmathrm%7Bin%7D%7D%29" medium="image">
			<media:title type="html">math formulae</media:title>
		</media:content>

		<media:content url="http://operaez.net/ltx/F_{t}" medium="image">
			<media:title type="html">Ft</media:title>
		</media:content>

		<media:content url="http://operaez.net/mimetex/F_%7Bt%7D%20=%20%28%202%20-%20N%20%5Ccdot%20V%20%29%20+%20%5Cmu%20*%20%281%20-%20N%20%5Ccdot%20V%29" medium="image">
			<media:title type="html">fresnel term img</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/02/irradiance.thumbnail.jpg" medium="image">
			<media:title type="html">irradiance.jpg</media:title>
		</media:content>

		<media:content url="http://eraser85.files.wordpress.com/2008/02/normals.thumbnail.jpg" medium="image">
			<media:title type="html">normals.jpg</media:title>
		</media:content>
	</item>
	</channel>
</rss>