The need for speed

Chris To, one of the guys from the .NET Compact Framework team responsible for making XNA possible in the first place, writes good stuff about CPU performance and garbage collection on Xbox. Includes bonus links to more general CLR performance references, too.

0

No SpriteBatch in the cold and the dark

I thought I was done writing about SpriteBatch, but then Ultrahead asked for some examples of interesting things that can be done with custom renderstates, and I realized I do have more to say about that. On Thursday night, just as I was about to start typing up the most awesome article ever, an even…

1

Return of the SpriteBatch: sorting part 3

SpriteSortMode.Texture sorts sprites by texture. SpriteSortMode.BackToFront and SpriteSortMode.FrontToBack do the obvious thing. But what is the difference between the Immediate and Deferred sorting modes, and why should you care? These modes both draw sprites in the same order that you call Draw, without any sorting. Performance will be good if you draw lots of sprites using…

2

SpriteBatch sorting part 2

Continuing from yesterday… Let’s consider a practical example of how to sort sprites for good performance. Imagine I am making a game called Super Dromedary Racer Extreme, which requires a top down view of a piece of desert. My graphical elements are: The ground is a tilemap containing various arrangements of sand dunes. I have…

10

SpriteBatch and SpriteSortMode

If graphics cards had personalities, they would be geeky and obsessively hard working. No signs of attention deficit disorder here! When a graphics card gets stuck into a job it likes to concentrate on a nice big meaty piece of work, and it doesn’t like to get distracted by changing over to some other task….

1

Technicolor Julias

My friend George Foot suggested this improved version of the Mandelbrot shader I posted yesterday: float4 PixelShader(float2 texCoord : TEXCOORD0) : COLOR0 { float2 c = (texCoord – 0.5) * Zoom * float2(1, Aspect) – Pan; float2 v = 0; float m = 0; const float r = 5; for (int n = 0; n…

7

Some links

I like Lisp. I’ve never had the chance to write anything significant using it, but it always struck me as a fascinating and fundamentally cool programming language. ML and O’Caml are not Lisp, but they share some of the same functional programming ideas. And now Jack Palevich writes about how to run F# (an O’Caml…

0

Sixty fractals per second

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 on the GPU. I’m computing…

15

Mysterious goings on in the night

Strange how the final stages of any software development project always seem to take place in the early hours of the morning! When I was in college and writing Allegro I would study for my music course during the day, then code at night. I had no internet access in my dorm room, so my…

5

Rendering a Model with a custom Effect

If you want to use your own effect for model rendering, you have basically two choices. You could just let the content pipeline do its stuff and then replace the output data with your own effect at runtime, or you could use a custom processor to specify your custom effect while the model is being…

8