How To (Properly) Use Windows Forms With XNA

Only works with XNA GSE 1.0 Refresh, not 2.0!

Update : See this post for a working sample!

Here’s something I had some difficulty doing “gracefully” with XNA : force a custom render device and user controls in the window while still using the Game framework. It’s quite easy to initialize XNA in a Managed DirectX fashion but you lose the links to the graphics device manager, the content pipeline and a lot of very useful (and well written) code behind the Game class.

Continue reading How To (Properly) Use Windows Forms With XNA

Bloom

Downloads

Bloom.rar [10mb] – C# 2.0 (VS.NET 2005)

Description

After seeing a couple of people using nVidia’s Bloom shader and be dissatisfied with its looks and perfomance, and more importantly because my employer asked me to do it, I made a Bloom shader from scratch.
It is highly customizable, supports FSAA and supports Pixel Shaders 2.0 up to 3.0.

Continue reading Bloom

Soft Stencil Shadows

Downloads

SoftStencils.rar [776Kb] – C# 2.0 (VS.NET 2005)

Description

This demo demonstrates a technique that fellow forum user kTech proposed in the Beta Discussion forum to smooth otherwise hard stencil shadows. It uses screen-space blur of the shadow pass to smoothen things out.

Continue reading Soft Stencil Shadows

Non-Reflective Water

Downloads

NonReflectiveWater.rar [7.9Mb] – C# 2.0 (VS.NET 2005)

Description

I had a request from a MMORPG developer to make a lightweight water shader that doesn’t need a reflection rendersurface, yet looks acceptable.
It looks nowhere as shiny as the reflective water shader or even TV’s built-in water, but it runs a zillion times faster because it doesn’t do any parallaxing, nor specular bumpmapping, nor perspective projection… Its implementation is alot simpler as well.

Continue reading Non-Reflective Water

Landscape Height-Based Coloring

Downloads

HeightBasedLandscape.rar [152Kb] – C# 2.0 (VS.NET 2005)

Description

A über-simple landscape shader that maps a color ramp to a landscape’s height. Basically, it demonstrates that shaders on landscapes is possible, and can be a nice addition to a visual landscape editor.

Continue reading Landscape Height-Based Coloring

The Blue Planet

Downloads

HLSLBluePlanet.rar [8.9Mb] – C# 2.0 (VS.NET 2005)

Description

This demo is the remake of an old 6.2 demo I had made to test materials and lighting. I was always decieved by that lack of proper bump-mapping in 6.2… so I remade it in 6.5 with custom shaders, very high-resolution textures and normal-maps, and even the moon!

Continue reading The Blue Planet

AGT’s Third Person Demo – C# 2.0 Port

Downloads

AGT3rdPersonDemo.rar [10Mb]

Description

This demo is a port of AGT’s Third Person Demo that was posted on the TV3D Beta Discussion forum. The original version was VB6, I just took the same media and code structure and adapted it to C# 2.0 (Visual Studio.NET 2005).

Continue reading AGT’s Third Person Demo – C# 2.0 Port