Check this out "Engineering Windows 7" blog ... this reminds of the start of the longhorn blogs... and this is the 3rd time I am seeing the words "open and honest" in articles on Windows 7 :)
Checkout the ShaderEffect Build Tasks as part of WPF Futures release...
With .NET 3.5 SP1 RTM we get a new class called D3DImage this allows for Direct3D surface to act as a Image
Checkput some of the samples that I found so far..
- This is cool, check out D3DImage type sample by Dr. WPF in .NET 3.5 SP1, this opens up world of possibilities...
- Also check this code shows how to map Web Cam video onto a WPF Brush using D3DImage
- XNA meets WPF - by Jeremiah Morrill
With the RTM of .NET 3.5 SP1 , we can now create hardware accelerated layer blending effects in WPF like those available in Image Editing tools & Photoshop & GIMP
some of the common blending modes are
Download ShaderPad and play with these effects..
With .NET 3.5 RTM release today, I see that there are following new properties added to the ShaderEffect class.
for setting the register index that contains the size of the image to which the effect is being applied to. documentation on web is complete with examples on this.
- int DdxUvDdyUvRegisterIndex
For specifying the boundaries of the effect, this can be used to create glow like effects when so that the platform knows that the effect can determine output color outside the bounds of the UIElement. No Samples in the documentation.
- double PaddingBottom
- double PaddingLeft
- double PaddingRight
- double PaddingTop
- ShaderRenderMode property on PixelShader
I shall be adding support for these in the ShaderPad shortly.
ShaderPad is a application like XamlPad / LinqPad , it is meant to server as WPF ShaderEffect Workbench. The ShaderEffect is a PixelShader based Effect that an be applied to any UIElement in WPF. This feature is available only in WPF 3.5 SP1
This release also includes the ability to animate the input variables that are passed to the ShaderEffect. This is a quick and dirty release :) , so expect some instability...
In next release will add the ability to load effects from a common location on web, and save to web, this allow people to more freely share their effects.
Download the Releases and source code at CodePlex.
Lookout for Effects releases soon....
Update: Example Blending Effects here
Added a new video to shows that this effect is not just a image effect . Original Post
WPF 3.5 SP1 (Beta) introduces the ability to apply Pixel Shader effects to any UIElement, these will executed by GPU by compatible cards. Greg Schechter's blog is an excellent place to start learning about these features.
Shader Effects have long been used in rendering pipeline, to create great special effects. And nowadays are used by almost every game engine to enhance the visual aspects of the game play.
Another good tutorial and Check out the HLSLTester code , it is helpful in creating new effects here. I have used the Shader code from this page and added some dynamic properties to create the following effect.
Download the full code for this demo from here.
Download the compiled effect.
Yesterday night I got to watch "The Dark Knight" and I loved it, the best part was Heath Ledger's portrayal of the Joker character.and off course the bat-pod I felt the batman character could have been portrayed a little bit more 'darker'. The dialog of the movie ...
"I'm not a monster. I'm just ahead of the curve." :)
This is a test post using Windows Live Writer
Good discussion on Channel 9 on the future of C# and some rational behind features that might make it in C# 4.0 .(We'll see what those features are at PDC )
"Concurrency features by far are game changing aspects.." - Andres
C# 4.0: Meet the Design Team
Won a BlackJack II at World Microsoft Partner Conference .
Now I have to Load Windows Mobile 6.1 on it and may be pre-beta versions of Silverlight Mobile :)
Fixed the Resize Bug, check out the latest version
Had to roll back the previous version as I had a Resizing Bug..
Minor update v1.1 to SilverCarrom
- Increase the MaxFrameRate to 120 , this make the physics more accurate
- Implemented ReSize Handlers to scale the Game fit the current Browser Size.
One the first code for any game will be setup a game loop. Here are some of the posts on how to achieve this in Silverlight applications:
Creating a Game Loop - Silverlight Games 101
Tip of the Day #5: Timers and the Main Game Loop - Mike Snows Silverlight Blog
More Silverlight performance tips here.
SilverCarrom is My first Silverlight Game.
Here are some of the To do items that I intend to work on when i have time...
- Implement scoring
- MultiPlayer ( Player Vs Computer & Player Vs Player )
- Physics Engine Bugs
- Game Varitions
- Help / Options
Here is the screen shot of v1.0 , I intend to upload the entire code soon.