<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx</link><description>The Xbox GPU is a shading monster! I've written several Mandelbrot viewers over the years, but this is the first time I've ever been able to move around this at a rock solid 60 frames per second: The trick to making this fast is to do all the heavy lifting</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1266454</link><pubDate>Tue, 12 Dec 2006 18:14:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1266454</guid><dc:creator>JoelMartinez</dc:creator><description>&lt;p&gt;wow, good stuff ... I always hear about people who got their start programming by typing out code from magazines. &amp;nbsp;Then I hear said people lamenting the fact that programming is so complex these days that it would never fit in a magazine for the next generation of programmers to learn from.&lt;/p&gt;
&lt;p&gt;This however, could easily be printed in a magazine :-D&lt;/p&gt;
</description></item><item><title>Blog/2006-12-13</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1275947</link><pubDate>Wed, 13 Dec 2006 17:39:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1275947</guid><dc:creator>PukiWiki/TrackBack 0.2</dc:creator><description>&lt;p&gt;2006-12-13 &amp;amp;dagger; 2006-12-13 Microsoft Robotic Studio 1.0 ???????? XNA Game Studio Express 1.0 &amp;amp;uarr;Microsoft Robotic Studio 1.0 &amp;amp;dagger; ?????????????????????????? ?????????????????????????? &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/robotics/downl"&gt;http://msdn.microsoft.com/robotics/downl&lt;/a&gt;...&lt;/p&gt;
</description></item><item><title>Hack-1  Looking Back / Looking Forward</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1278045</link><pubDate>Thu, 14 Dec 2006 01:03:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1278045</guid><dc:creator>Darksides - Hack-1 Project</dc:creator><description>&lt;p&gt;Looking back In the beginning there are darkness..., damn stop , too far back Looking back to before...&lt;/p&gt;
</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1288435</link><pubDate>Fri, 15 Dec 2006 01:36:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1288435</guid><dc:creator>hordurj</dc:creator><description>&lt;p&gt;Very nice example, and easy to play with. Here is an example of where the shader uses the iteration counts to create a grayscale image.&lt;/p&gt;
&lt;p&gt;float4 PixelShader(float2 texCoord : TEXCOORD0) : COLOR0 &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;float2 c = (texCoord - 0.5) * Zoom * float2(1, Aspect) - Pan; &amp;nbsp; &lt;/p&gt;
&lt;p&gt;	float2 v = 0;&lt;/p&gt;
&lt;p&gt;	int n = 0;&lt;/p&gt;
&lt;p&gt;	for (n = 0; n &amp;lt; Iterations &amp;amp;&amp;amp; dot(v,v)&amp;lt;4; n++) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;	{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;		v = float2(v.x * v.x - v.y * v.y, v.x * v.y * 2) + c; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;	} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;	&lt;/p&gt;
&lt;p&gt;	return (dot(v, v) &amp;gt; 4) ? (float)n / (float)Iterations : 0;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1331176</link><pubDate>Wed, 20 Dec 2006 15:34:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1331176</guid><dc:creator>Hunter767</dc:creator><description>&lt;p&gt;Any ideas why I get this error?&lt;/p&gt;
&lt;p&gt;System.InvalidOperationException&lt;/p&gt;
&lt;p&gt;Both a valid vertex shader and &amp;nbsp;pixel shader (or valid effect) must be set on the device before draw operations may be performed.&lt;/p&gt;
&lt;p&gt;Running on XP btw, haven't tried 360&lt;/p&gt;
</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1405217</link><pubDate>Wed, 03 Jan 2007 20:15:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1405217</guid><dc:creator>mamue</dc:creator><description>&lt;p&gt;Hunter767,&lt;/p&gt;
&lt;p&gt;it seems like your graphics card doesn't support 3.0 pixel shaders. I had the exact same problem, and it took me a while to figure it out (the exception message is not very helpful)..&lt;/p&gt;
&lt;p&gt;Try to change the &amp;quot;compile ps_3_0&amp;quot; directive (last line in the fx file) to ps_2_a or even ps_2_0. You'll also have to decrease the number of iterations (first line of the fx file). The maximum number of iterations on my machine is 32, and even then it's painfully slow - time to get a new video card I guess..&lt;/p&gt;
</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#1413083</link><pubDate>Fri, 05 Jan 2007 03:01:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1413083</guid><dc:creator>lloigor</dc:creator><description>&lt;p&gt;Having received the same System.InvalidOperationException error, I'm slightly puzzled as my graphic card is pixel shader 3.0 capable. &amp;nbsp;To double check this, I've interrogated the MaxPixelShaderProfile GraphicsDeviceCapability of my graphics adapter which correctly returns PS_3_0.&lt;/p&gt;
&lt;p&gt;Having said this, if I drop to PS_2_a and 64 iterations (as suggested by mamue) it runs up without error.&lt;/p&gt;
&lt;p&gt;As a result, and since I’m new to this type of development work, I wondered if anyone could provide any wisdom as to why the Pixel Shader 3 setting isn't playing ball.&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#9754575</link><pubDate>Mon, 15 Jun 2009 22:32:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9754575</guid><dc:creator>ben_griffiths</dc:creator><description>&lt;p&gt;Well this was an odd experience. Search google for XNA fractals, get an example working, toggle back to the webpage you were reading to see if there is anything else interesting here and realise that you're my best friend's (Ben) brother! Surreal is probably the best word for it.&lt;/p&gt;
&lt;p&gt;Thanks for a great article though.&lt;/p&gt;
</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#9913496</link><pubDate>Tue, 27 Oct 2009 13:58:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913496</guid><dc:creator>Trinnexx</dc:creator><description>&lt;p&gt;ResouceUsage.none?&lt;/p&gt;
&lt;p&gt;I take it by the date this is for older versions of xna. I imagine TextureUsage replaces resouce usage?&lt;/p&gt;
&lt;p&gt;I changed it to TextureUsage but all I get is a black screen sadly.&lt;/p&gt;</description></item><item><title>re: Sixty fractals per second</title><link>http://blogs.msdn.com/shawnhar/archive/2006/12/11/sixty-fractals-per-second.aspx#9913576</link><pubDate>Tue, 27 Oct 2009 16:49:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913576</guid><dc:creator>ShawnHargreaves</dc:creator><description>&lt;p&gt;Yes, ResourceUsage should be changed to TextureUsage in more recent versions of the XNA Framework.&lt;/p&gt;
&lt;p&gt;I haven't tried this code recently, but I would expect it to still work. Are you running this on Xbox or PC? (if you're on PC, you may have to change the shader model to ps_2_0).&lt;/p&gt;
</description></item></channel></rss>