Sign In
MSDN Blogs
Microsoft Blog Images
More ...
Shawn Hargreaves Blog
Links
Shawn's Homepage
Twitter @shawnhargreaves
Common Tasks
Blog Home
Email Blog Author
RSS for posts
RSS for comments
Legal
using Microsoft.Disclaimer;
Disclaim("This is my blog");
Disclaim("I am not Microsoft");
Disclaim("I speak for myself");
Disclaim("All rights reserved");
Index
Categorized index of old blog posts
Recent Posts
Built-in effects, permutations, and performance
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
New built-in effects in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
BasicEffect optimizations in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
Effect API changes in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
Vertex data in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
Archives
Archives
May 2012
(1)
April 2012
(1)
March 2012
(2)
January 2012
(2)
December 2011
(3)
November 2011
(2)
October 2011
(6)
July 2011
(2)
June 2011
(1)
May 2011
(3)
April 2011
(10)
March 2011
(6)
February 2011
(3)
January 2011
(3)
December 2010
(6)
November 2010
(8)
October 2010
(9)
September 2010
(14)
August 2010
(5)
July 2010
(9)
June 2010
(6)
May 2010
(7)
April 2010
(14)
March 2010
(17)
February 2010
(11)
January 2010
(2)
December 2009
(4)
November 2009
(5)
October 2009
(4)
September 2009
(3)
August 2009
(3)
July 2009
(8)
June 2009
(15)
May 2009
(9)
April 2009
(6)
March 2009
(6)
February 2009
(5)
January 2009
(5)
December 2008
(5)
November 2008
(5)
October 2008
(6)
September 2008
(9)
August 2008
(8)
July 2008
(4)
June 2008
(3)
May 2008
(6)
April 2008
(9)
March 2008
(4)
February 2008
(2)
January 2008
(4)
December 2007
(12)
November 2007
(6)
October 2007
(6)
September 2007
(7)
August 2007
(4)
July 2007
(7)
June 2007
(6)
May 2007
(5)
April 2007
(11)
March 2007
(18)
February 2007
(3)
January 2007
(9)
December 2006
(14)
November 2006
(8)
September 2006
(3)
August 2006
(7)
Blog - Title
April, 2010
MSDN Blogs
>
Shawn Hargreaves Blog
>
April, 2010
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Shawn Hargreaves Blog
Built-in effects, permutations, and performance
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
12
Comments
This article is prerecorded. Shawn is away (getting married later today). Replies to comments will be delayed. Plagiarizing my MIX talk , I thought it would be useful to summarize the performance implications of choosing between the different shader permutations...
Shawn Hargreaves Blog
New built-in effects in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
12
Comments
This article is prerecorded. Shawn is away (getting married at the end of the week). Replies to comments will be delayed. Remember the story about the chessboard and the grains of rice ? Shader programmers have the same problem. We start with a bunch...
Shawn Hargreaves Blog
BasicEffect optimizations in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
18
Comments
The BasicEffect API and feature set did not change in Game Studio 4.0, but the implementation saw some aggressive optimizations. In previous versions, BasicEffect was intended as a starting point for beginners. We expected expert programmers to soon move...
Shawn Hargreaves Blog
Effect API changes in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
37
Comments
Where in previous XNA versions you used to write: effect.Begin(); effect.CurrentTechnique.Passes[0].Begin(); DrawStuff(); effect.CurrentTechnique.Passes[0].End(); effect.End(); With Game Studio 4.0 this becomes just: effect.CurrentTechnique...
Shawn Hargreaves Blog
Vertex data in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
34
Comments
In previous XNA versions, a VertexBuffer was just a loosely typed bag of bytes. A separate VertexDeclaration object specified how to interpret these bytes. As of Game Studio 4.0, every VertexBuffer now has an associated VertexDeclaration, which is specified...
Shawn Hargreaves Blog
Viewport tweaks in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
13
Comments
Game Studio 4.0 includes some tweaks to simplify common patterns when working with Viewport objects. We added two constructors: public Viewport( int x, int y, int width, int height); public Viewport(Rectangle bounds); And we added a Bounds property...
Shawn Hargreaves Blog
ElapsedRealTime and TotalRealTime in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
21
Comments
I often refer back to internal design documents and bug databases while writing these "what's new" blog posts, but it rarely makes sense to quote directly from them. In this case, though, the existing text seems clear enough that I shall simply...
Shawn Hargreaves Blog
How Shawn learned to stop worrying and love premultiplied alpha
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
17
Comments
I like to think I know what I'm doing with computer graphics, so I find it embarrassing that it took us four versions to get something as fundamental as alpha blending right . To cut a long story short, I didn't properly understand alpha blending until...
Shawn Hargreaves Blog
Premultiplied alpha in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
18
Comments
As of Game Studio 4.0, the default alpha blending mode is now premultiplied rather than interpolative. Why? I was fed up of repeating this conversation: Customer: Why do I see ugly borders around the edges of my sprites ? (or sometimes: Why does...
Shawn Hargreaves Blog
SpriteSortMode.Immediate in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
9
Comments
Every now and then, a Game Studio 3.1 customer tries something like: spriteBatch.Begin(SpriteSortMode.Immediate); SetRenderStateFoo(); spriteBatch.Draw(...); SetRenderStateBar(); spriteBatch.Draw(...); But this does not work! Sadness...
Shawn Hargreaves Blog
SpriteBatch and custom shaders in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
18
Comments
Improvement #1: Our Sprite Effects sample uses SpriteSortMode.Immediate to draw sprites with a custom pixel shader: // Begin the sprite batch, then activate our custom effect. spriteBatch.Begin(SpriteBlendMode.None, SpriteSortMode.Immediate, SaveStateMode...
Shawn Hargreaves Blog
SpriteBatch and custom renderstates in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
6
Comments
The theory: SpriteBatch was designed to provide an easy and efficient way to draw 2D sprites. Everything it can do, you can also do yourself by creating vertices and calling the lower level Draw* APIs, so our goal with SpriteBatch was to make the most...
Shawn Hargreaves Blog
Steve Hazen on vector/matrix math
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
3
Comments
Steve Hazen has some great articles about the kind of math used in 3D game programming: Matrix Basics. How to step away from storing an orientation as '3 angles' Working with and Visualizing Vectors Be sure to follow the links in that second article ...
Shawn Hargreaves Blog
State objects in XNA Game Studio 4.0
Posted
over 2 years ago
by
Shawn Hargreaves - MSFT
30
Comments
The most-often-linked-to article I ever wrote is about renderstates, so it should come as no surprise that we tried to improve this area in Game Studio 4.0. There are fundamentally only two sane ways to manage renderstates: Assume nothing: explicitly...
Page 1 of 1 (14 items)