warning: Creating default object from empty value in /home/hplus/ on line 33.
Beautiful bits.
jwatte's picture

Bad font antialiasing in WPF menu items

I'm using WPF 3.5, Visual Studio 2008 SP1, and developing for Windows XP SP3.

No matter what I do, the menu bar and menu items of my application are ugly, blurry, anti-aliased. WinForms, MFC and Win32 applications however have nice, crisp, clear menu items.

I've tried checking the "align to device pixels" box, but it only gives a marginal improvement.

jwatte's picture

XNA, light mapping, specular

I've been working on a GPU accelerated light map generator for XNA for a little while. I'm using the light map only to tell shadow/light for each surface for each light, and then solving the basic light equation (ambient + diffuse + specular + emissive) per pixel, multiplied by shadow.

jwatte's picture

Drawing silhouetted characters behind smoke particle systems

A question came up on the XNA forums: "how do I draw the silhouettes of objects in red when they are covered by smoke?"

Here is my proposal on how to use destination alpha to do it:

0) When setting up the back buffer, make sure you get destination alpha:
  graphics.PreferredBackBufferFormat = SurfaceFormat.Color; // has alpha

jwatte's picture

Wood Textures

Textures that fall under the category of "wood" go here.

jwatte's picture

Jon's textures page

Sometimes, I create textures. Most of the time, they are crap, but sometimes, they are nice. Especially when I start from some other art (which is always re-usable). I place these textures in the public domain -- do with them what you will!

jwatte's picture

Making a sprite follow a path

A while back, I posted a simple program on the XNA forums that showed how to define a path, and then have objects follow that path. I figured I'd copy the code from there onto this site, for easy reference. The program below is a command-line C# program; you can compile it from the command line with "csc flypath.cs" and run it to test it out. Or you can copy the "follower" class from the middle, and use it in your XNA project. (The additional code, including the declaration of Vector2, is just there to make the test program work stand-alone)

jwatte's picture

A simple illustration of different interpolation functions

Here are a few interpolation functions illustrated (I drew these in Photoshop, so they're not bit accurate, but should show the variations well enough):

Linear Interpolation
Linear interpolation

jwatte's picture

More PIX for Windows problems. This time, I think it's NVIDIA's fault.

It seems to me as if PIX for Windows, and its integration with the NVIDIA device drivers, has just gone downhill during the last year or so. I have a single project, which can demonstrate bugs both in the latest NVIDIA graphics drivers, and in the PIX tool itself.

Galactic Trail - A Space-Based Real-Time Strategy Game for Xbox Live Community Games

After working on the 3D game Ko-Ado the Cloud for the Dream-Build-Play competition, I decided to relax with a simpler, 2D-based game. And what better genre to start out with than the real-time strategy game?

Syndicate content