<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>JeGX's Infamous Lab</title>
	
	<link>http://www.ozone3d.net/blogs/lab</link>
	<description>Graphics programming, demos, quick reviews and other higgledy-piggledy things I do...</description>
	<pubDate>Sat, 19 Jul 2008 14:01:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/JeGXInfamousLab" type="application/rss+xml" /><item>
		<title>PhysX Control Panel</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/339884237/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=121#comments</comments>
		<pubDate>Sat, 19 Jul 2008 14:01:42 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[tips and tricks]]></category>

		<category><![CDATA[control panel]]></category>

		<category><![CDATA[physx]]></category>

		<category><![CDATA[physx properties]]></category>

		<category><![CDATA[physx.cpl]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=121</guid>
		<description><![CDATA[I don&#8217;t know how but I can no longer start .cpl files. CPL files are also called control panel applet and can be started directly in command line. You can find more information about cpl file here.
What I wanted to do is to start PhysX.cpl to display PhysX Properties. After some searches, I found the [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how but I can no longer start .cpl files. CPL files are also called <b>control panel applet</b> and can be started directly in command line. You can find more information about cpl file <a href="http://support.microsoft.com/kb/313808">here</a>.</p>
<p>What I wanted to do is to start PhysX.cpl to display PhysX Properties. After some searches, I found the solution. Just enter <b>control</b> followed by the cpl file in the run box of Windows:</p>
<pre>
control PhysX.cpl
</pre>
<p>and you should get this:<br />
<center>
<p><img src="http://www.ozone3d.net/blogs/lab/public/200807/physx-cpl.jpg" /></p>
<p></center></p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D121&amp;title=PhysX+Control+Panel" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=121</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=121</feedburner:origLink></item>
		<item>
		<title>Depth of Field</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/337810947/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=120#comments</comments>
		<pubDate>Thu, 17 Jul 2008 07:09:24 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[depth of field]]></category>

		<category><![CDATA[dof]]></category>

		<category><![CDATA[post processing]]></category>

		<category><![CDATA[ssao]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=120</guid>
		<description><![CDATA[





I played with Depth Of Field (DoF) these last days in the upcoming Demoniak3D but I&#8217;m not very satisfied because I still have some problem to control the focus (the non blurred part of the field of view). Depth of field is done in a post processing step and uses the scene color and depth [...]]]></description>
			<content:encoded><![CDATA[<div class="jLanguage">
<ul>
<li><a href="?feed=rss2&amp;lan=English"><img alt="English" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/en.png" /></a></li>
<li><a href="?feed=rss2&amp;lan=French"><img alt="French" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/fr.png" /></a></li>
</ul>
</div>
<p>I played with <b>Depth Of Field</b> (DoF) these last days in the upcoming <b>Demoniak3D</b> but I&#8217;m not very satisfied because I still have some problem to control the focus (the non blurred part of the field of view). Depth of field is done in a post processing step and uses the scene color and depth maps as only inputs (no multiple render targets). Here is a first preview:<br />
<center></p>
<p><img src="http://www.ozone3d.net/blogs/lab/public/200807/demoniak-depth-of-field-01.jpg" /></p>
<p></center><br />
I will continue my experimentations up to get a functional DoF and will add the support of MRT (multiple render targets) in the post processing effects (MRT will allow me to explore another cool effect: SSAO&#8230;).</p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D120&amp;title=Depth+of+Field" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=120</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=120</feedburner:origLink></item>
		<item>
		<title>Gamma Correction</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/332737047/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=119#comments</comments>
		<pubDate>Fri, 11 Jul 2008 14:43:52 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[2D]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[filter]]></category>

		<category><![CDATA[gamma correction]]></category>

		<category><![CDATA[post processing]]></category>

		<category><![CDATA[rendering]]></category>

		<category><![CDATA[smode]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=119</guid>
		<description><![CDATA[





I&#8217;ve coded today a small gamma correction filter in Smode. I&#8217;ll talk about gamma correction a little bit more very soon with a Demoniak3D demo. Here is the result on a simple scene: a teapot lit with a Phong shader.
The following image shows the rendering of the scene done in the usual manner, I mean [...]]]></description>
			<content:encoded><![CDATA[<div class="jLanguage">
<ul>
<li><a href="?feed=rss2&amp;lan=English"><img alt="English" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/en.png" /></a></li>
<li><a href="?feed=rss2&amp;lan=French"><img alt="French" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/fr.png" /></a></li>
</ul>
</div>
<p>I&#8217;ve coded today a small <b>gamma correction</b> filter in <b>Smode</b>. I&#8217;ll talk about gamma correction a little bit more very soon with a <b>Demoniak3D</b> demo. Here is the result on a simple scene: a teapot lit with a Phong shader.</p>
<p>The following image shows the rendering of the scene done in the usual manner, I mean without gamma correction:<br />
<center>
<p><img src="http://www.ozone3d.net/blogs/lab/public/200807/smode-gamma-correction-none.jpg" /></p>
<p></center></p>
<p>and now the same scene gamma-corrected (factor 2.2):<br />
<center>
<p><img src="http://www.ozone3d.net/blogs/lab/public/200807/smode-gamma-correction.jpg" /></p>
<p></center></p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D119&amp;title=Gamma+Correction" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=119</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=119</feedburner:origLink></item>
		<item>
		<title>Multithreaded Build with Visual Studio 2005</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/331704291/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=118#comments</comments>
		<pubDate>Thu, 10 Jul 2008 12:49:09 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[game development]]></category>

		<category><![CDATA[gamedev]]></category>

		<category><![CDATA[multithreaded build]]></category>

		<category><![CDATA[vc8]]></category>

		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=118</guid>
		<description><![CDATA[





Under Visual Studio 2005 (VC8), you can enable the multithreaded build of projects. This great feature makes it possible to use several CPUs to build your projects. This is a per-project setting and it&#8217;s done in command line: /MPx where x is the number of cores you want to use. Example: /MP2 to use 2 [...]]]></description>
			<content:encoded><![CDATA[<div class="jLanguage">
<ul>
<li><a href="?feed=rss2&amp;lan=English"><img alt="English" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/en.png" /></a></li>
<li><a href="?feed=rss2&amp;lan=French"><img alt="French" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/fr.png" /></a></li>
</ul>
</div>
<p>Under Visual Studio 2005 (VC8), you can enable the multithreaded build of projects. This great feature makes it possible to use several CPUs to build your projects. This is a per-project setting and it&#8217;s done in command line: /MPx where x is the number of cores you want to use. Example: /MP2 to use 2 CPUs if you have (like me) a core2duo.</p>
<p>I&#8217;ve done some tests with Demoniak3D:<br />
- Demoniak3D (default): Build Time 0:33<br />
- Demoniak3D (/MP2): Build Time 0:15</p>
<p>Great boost in productivity of large projects!</p>
<p><a href="http://www.ozone3d.net/smf/index.php/topic,1461.0.html">[-source-]</a></p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D118&amp;title=Multithreaded+Build+with+Visual+Studio+2005" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=118</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=118</feedburner:origLink></item>
		<item>
		<title>FurMark Kaspersky Alarms</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/331644066/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=117#comments</comments>
		<pubDate>Thu, 10 Jul 2008 11:15:14 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[benchmark]]></category>

		<category><![CDATA[false positive]]></category>

		<category><![CDATA[furmark]]></category>

		<category><![CDATA[kaspersky]]></category>

		<category><![CDATA[trojan]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=117</guid>
		<description><![CDATA[





Some users have reported that FurMark 1.4.0 has the Trojan-Downloader.Win32.Agent.vpx. I did this morning the scan with the latest version of Kaspersky and the very latest version of their database. Kaspersky hasn&#8217;t found any threat or trojan in FurMark setup installer nor in FurMark root directory. FurMark is clean. MajorGeeks and Softpedia are very good [...]]]></description>
			<content:encoded><![CDATA[<div class="jLanguage">
<ul>
<li><a href="?feed=rss2&amp;lan=English"><img alt="English" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/en.png" /></a></li>
<li><a href="?feed=rss2&amp;lan=French"><img alt="French" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/fr.png" /></a></li>
</ul>
</div>
<p>Some users have reported that FurMark 1.4.0 has the <b>Trojan-Downloader.Win32.Agent.vpx</b>. I did this morning the scan with the latest version of <a href="http://www.kaspersky.com">Kaspersky</a> and the very latest version of their database. Kaspersky hasn&#8217;t found any threat or trojan in FurMark setup installer nor in FurMark root directory. FurMark is <b>clean</b>. <a href="http://www.majorgeeks.com/download5984.html">MajorGeeks</a> and <a href="http://www.softpedia.com/progClean/FurMark-Clean-102854.html">Softpedia</a> are very good proofs of FurMark&#8217;s cleanness.</p>
<p>I did some searches over the Net and I found <a href="http://forum.kaspersky.com/index.php?showtopic=76095&#038;st=0">that others users have some false alarms</a>. I guess the problem comes from the InnoSetup (the utility used to create FurMark_Setup.exe) and depends of the version of Kaspersky&#8217;s database. So if you have Kaspersky antivirus, be sure to update it with the latest database.</p>
<p>I sent FurMark_Setup.exe to Kaspersky Lab and I just receive the reply from the Virus Analyst:<br />
&#8220;I suppose it WAS a false alarm, and it has been already fixed.&#8221;<br />
This time everything is ok!</p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D117&amp;title=FurMark+Kaspersky+Alarms" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=117</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=117</feedburner:origLink></item>
		<item>
		<title>Saturate function in GLSL</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/330990417/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=116#comments</comments>
		<pubDate>Wed, 09 Jul 2008 18:15:50 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[GLSL]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[cg]]></category>

		<category><![CDATA[clamp]]></category>

		<category><![CDATA[game developpment]]></category>

		<category><![CDATA[gamedev]]></category>

		<category><![CDATA[glsl]]></category>

		<category><![CDATA[graphics programming]]></category>

		<category><![CDATA[hlsl]]></category>

		<category><![CDATA[saturate]]></category>

		<category><![CDATA[shader conversion]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=116</guid>
		<description><![CDATA[





During the conversion of shaders written in Cg/HLSL, we often find the saturate() function. This function is not valid in GLSL even though on NVIDIA, the GLSL compiler accepts it (do not forget that NVIDIA&#8217;s GLSL compiler is based on Cg compiler). But ATI&#8217;s GLSL compiler will reject saturate() with a nice error. This function [...]]]></description>
			<content:encoded><![CDATA[<div class="jLanguage">
<ul>
<li><a href="?feed=rss2&amp;lan=English"><img alt="English" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/en.png" /></a></li>
<li><a href="?feed=rss2&amp;lan=French"><img alt="French" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/fr.png" /></a></li>
</ul>
</div>
<p>During the conversion of shaders written in <b>Cg/HLSL</b>, we often find the <b>saturate()</b> function. This function is not valid in <b>GLSL</b> even though on NVIDIA, the GLSL compiler accepts it (do not forget that NVIDIA&#8217;s GLSL compiler is based on Cg compiler). But ATI&#8217;s GLSL compiler will reject saturate() with a nice error. This function allows to limit the value of a variable to the range [0.0 - 1.0]. In GLSL, there is a simple manner to do the same thing: <b>clamp()</b>.</p>
<p>Cg code:</p>
<pre>
float3 result = saturate(texCol0.rgb - Density*(texCol1.rgb));
</pre>
<p>GLSL equivalent:</p>
<pre>
vec3 result = clamp(texCol0.rgb - Density*(texCol1.rgb), 0.0, 1.0);
</pre>
<p>BTW, don&#8217;t forget all float4, float3 and float2 which correct syntax in GLSL is vec4, vec3 and vec2.</p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D116&amp;title=Saturate+function+in+GLSL" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=116</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=116</feedburner:origLink></item>
		<item>
		<title>Velvet Shader Preview</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/329711295/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=115#comments</comments>
		<pubDate>Tue, 08 Jul 2008 10:47:27 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[GLSL]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[demo]]></category>

		<category><![CDATA[glsl]]></category>

		<category><![CDATA[smode]]></category>

		<category><![CDATA[velvet]]></category>

		<category><![CDATA[velvet shader]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=115</guid>
		<description><![CDATA[





Are you ready for a small velvet GLSL shader? Here&#8217;s one, at least a preview of the one I&#8217;ve just coded for a demo with Smode. Smode&#8230; a software dedicated to create&#8230; demos! And the cool thing, is that Smode demos will be also available for Demoniak3D. Don&#8217;t look for Smode, it&#8217;s not available for [...]]]></description>
			<content:encoded><![CDATA[<div class="jLanguage">
<ul>
<li><a href="?feed=rss2&amp;lan=English"><img alt="English" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/en.png" /></a></li>
<li><a href="?feed=rss2&amp;lan=French"><img alt="French" src="http://www.ozone3d.net/blogs/lab/wp-content/plugins/jLanguage/icons/fr.png" /></a></li>
</ul>
</div>
<p>Are you ready for a small <b>velvet GLSL shader</b>? Here&#8217;s one, at least a preview of the one I&#8217;ve just coded for a demo with <a href="http://www.diplabs.com">Smode</a>. Smode&#8230; a software dedicated to create&#8230; demos! And the cool thing, is that Smode demos will be also available for <b>Demoniak3D</b>. Don&#8217;t look for Smode, it&#8217;s not available for you, public&#8230; Only few people on this planet are enough lucky to play with. But if you really want to touch it, just drop me an email&#8230;</p>
<p><center>
<p><img src="http://www.ozone3d.net/blogs/lab/public/200807/smode-velvet-demo-400x244.jpg" /></p>
<p></center></p>
<p>As soon as the next release of <b>Demoniak3D</b>, the 1.24.0 (or better the 1.30.0 because of the huge amount of changes), will be ok, I&#8217;ll put online the velvet demo with its nice GLSL shader. And if I&#8217;m late, don&#8217;t hesitate to post a small message to wake me up!</p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D115&amp;title=Velvet+Shader+Preview" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=115</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=115</feedburner:origLink></item>
		<item>
		<title>GLSL support in Intel graphics drivers</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/309525074/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=114#comments</comments>
		<pubDate>Wed, 11 Jun 2008 10:24:07 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[GLSL]]></category>

		<category><![CDATA[Graphics Drivers]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[glsl]]></category>

		<category><![CDATA[glsl support]]></category>

		<category><![CDATA[graphics driver]]></category>

		<category><![CDATA[intel]]></category>

		<category><![CDATA[lack of support]]></category>

		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=114</guid>
		<description><![CDATA[A user from oZone3D.Net forum asked me some info about the GLSL support of Intel graphics chips. It&#8217;s wellknown (sorry Intel) that Intel has a bad OpenGL support in its Windows drivers and even if Intel&#8217;s graphics drivers support OpenGL 1.5, there is still a lack of GLSL support. We can&#8217;t find the GL_ARB_shading_language_100 extension [...]]]></description>
			<content:encoded><![CDATA[<p>A user from oZone3D.Net forum asked me some info about the GLSL support of Intel graphics chips. It&#8217;s wellknown (sorry Intel) that Intel has a bad OpenGL support in its Windows drivers and even if Intel&#8217;s graphics drivers support OpenGL 1.5, there is still a lack of GLSL support. We can&#8217;t find the GL_ARB_shading_language_100 extension (this extension means the graphics driver supports the OpenGL shading language) and this extension should be supported by any OpenGL 1.5 compliant graphics driver. You can use <a href="http://www.ozone3d.net/gpu_caps_viewer/">GPU Caps Viewer</a> to check for the avaibility of GL_ARB_shading_language_100 (in OpenGL Caps tab).</p>
<p>Here is an example of a Intel&#8217;s graphics driver that support openGL 1.5 without supporting GLSL:<br />
- <a href="http://www.ozone3d.net/gpu/db/index.php?which=e727285e35b268905779edd9c8dc12b6">Mobile IntelR 965 Express Chipset Family</a></p>
<p>For more examples, look at users&#8217;s submissions here: <a href="http://www.ozone3d.net/gpu/db/">www.ozone3d.net/gpu/db/</a></p>
<p>Okay this is my analysis, but what is the Intel point of view? Here is the answer:<br />
- <a href="http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30244399.aspx">x3100 &#038; OpenGL Shader (GLSL) thread</a><br />
- <a href="http://softwarecommunity.intel.com/isn/Community/en-US/forums/permalink/30244399/30249805/ShowThread.aspx#30249805">Intel&#8217;s answer</a></p>
<p>I think GLSL support with Windows is not a priority for Intel&#8230;</p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D114&amp;title=GLSL+support+in+Intel+graphics+drivers" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=114</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=114</feedburner:origLink></item>
		<item>
		<title>GLSL float to RGBA8 encoder</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/304412021/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=113#comments</comments>
		<pubDate>Wed, 04 Jun 2008 09:36:39 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[GLSL]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[float to rgba encoder]]></category>

		<category><![CDATA[glsl]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=113</guid>
		<description><![CDATA[Packing a [0-1] float value into a 4D vector where each component will be a 8-bits integer:

vec4 packFloatToVec4i(const float value)
{
  const vec4 bitSh = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);
  const vec4 bitMsk = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);
  vec4 res = fract(value * bitSh);
  res -= res.xxyz * bitMsk;
  return res;
}

Unpacking a [...]]]></description>
			<content:encoded><![CDATA[<p>Packing a [0-1] float value into a 4D vector where each component will be a 8-bits integer:</p>
<pre>
vec4 packFloatToVec4i(const float value)
{
  const vec4 bitSh = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);
  const vec4 bitMsk = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);
  vec4 res = fract(value * bitSh);
  res -= res.xxyz * bitMsk;
  return res;
}
</pre>
<p>Unpacking a [0-1] float value from a 4D vector where each component was a 8-bits integer:</p>
<pre>
float unpackFloatFromVec4i(const vec4 value)
{
  const vec4 bitSh = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);
  return(dot(value, bitSh));
}
</pre>
<p>Source of these codes: <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=463075">Gamedev forums</a></p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D113&amp;title=GLSL+float+to+RGBA8+encoder" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=113</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=113</feedburner:origLink></item>
		<item>
		<title>Better, smaller and faster random number generator</title>
		<link>http://feeds.feedburner.com/~r/JeGXInfamousLab/~3/304400674/</link>
		<comments>http://www.ozone3d.net/blogs/lab/?p=112#comments</comments>
		<pubDate>Wed, 04 Jun 2008 09:18:44 +0000</pubDate>
		<dc:creator>JeGX</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[c/c++]]></category>

		<category><![CDATA[random generator]]></category>

		<guid isPermaLink="false">http://www.ozone3d.net/blogs/lab/?p=112</guid>
		<description><![CDATA[I found this cool random generator on rgba&#8217;s website. rgba is a wellknown demoscene group specialized in 4k prods. This random generator is used in their prods:

static unsigned int mirand = 1;
float sfrand( void )
{
    unsigned int a;
    mirand *= 16807;
    a = (mirand&#038;0x007fffff) &#124; 0x40000000;
 [...]]]></description>
			<content:encoded><![CDATA[<p>I found this cool random generator on rgba&#8217;s website. <b>rgba</b> is a wellknown demoscene group specialized in 4k prods. This random generator is used in their prods:</p>
<pre>
static unsigned int mirand = 1;
float sfrand( void )
{
    unsigned int a;
    mirand *= 16807;
    a = (mirand&#038;0x007fffff) | 0x40000000;
    return( *((float*)&#038;a) - 3.0f );
}
</pre>
<p>It produces values in the range [-1.0; 1.0].</p>
<p>You can find the making of this random gen <a href="http://rgba.scenesp.org/articles/sfrand/sfrand.htm">HERE</a>.</p>

<br /><span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" border="0" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" border="0" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" border="0" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" border="0" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" border="0" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" border="0" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" border="0" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ozone3d.net%2Fblogs%2Flab%2F%3Fp%3D112&amp;title=Better%2C+smaller+and+faster+random+number+generator" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" border="0" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.ozone3d.net/blogs/lab/?feed=rss2&amp;p=112</wfw:commentRss>
		<feedburner:origLink>http://www.ozone3d.net/blogs/lab/?p=112</feedburner:origLink></item>
	</channel>
</rss>
