Saturday 21 March 2009

Silverlight: Web Pixel Shader Compiler

So I've built a very quick silverlight application (I will tidy it up later), that will compile your pixel shader code for you.  This saves you from downloading the DirectX SDK.

The url to use the compiler is here: http://www.voxpeeps.com/slpixelshadercompiler/

A little screenshot is below:

image

In the first textbox, enter the name of your .ps file (do not include the .ps extension).

In the second textbox, enter the contents of your .fx file.

Click on the compile button, and it will give you a link to download your .ps file.

You can the include your .ps file into your silverlight 3 application.

For more details on creating custom pixel shaders see this blog entry from Andy Beaulieu 

I will probably do a quick video on using this tool soon, and will tidy it up to make it look a little more professional at a later date.

In the mean time, feel free to go to: http://wpffx.codeplex.com/ and compile them for use in Silverlight at http://www.voxpeeps.com/slpixelshadercompiler/

6 comments:

Joeyw said...

Greate, wouldn't it be great to have a site that lets you try out the shader in the browser for instant feedback!

chrishayuk said...

Thanks Joey :)

I was actually considering extending the application to do just that

Joeyw said...

Chris,
I (and others) see performance problems with these shaders in Silverlight. Do you see these problems too? It's looking like they're CPU rendered regardless of the GPU flag.

Joe

chrishayuk said...

You are correct Joey they are CPU rendered in Silverlight 3

I suspect that will probably change in the future.

Unknown said...

Great tool. Too bad I found it only after installing DX SDK %)

Steve Haroz said...

Having trouble opening the page. Here's the error details:

Sys.InvalidOperationException: Invalid XAML for control 'Silverlight1'. [] (line 5, col 34): 2007 An error has occurred.
Line: 453
Char: 17
Code: 0
URI: http://www.voxpeeps.com/SLPixelShaderCompiler/ScriptResource.axd?d=72orPtojcDm315X-KqD55cyFAGlShyFOiQMEr42bRRYrYteHfus0iE9Lu9QB7vdOKpQqnO7zaRu42ieREsTHbQ2&t=ffffffff9df4fb07


I look forward to trying it!