Use Matrix.CreateScale(1.5f, 1.5f, 1f)
- basically: don't scale the Z axis.
The GPU raster area is in the range (-1, -1, 0)
to (1, 1, 1)
. Only fragments (pixels) falling in this volume are rendered. The Z-axis is the range of your depth buffer. Traditionally a projection matrix takes your scene and projects it into this space.
SpriteBatch
's equivalent of a projection matrix takes your scene in "client space" (origin top left corner) and projects it into this space. But it leaves the Z axis alone.
By default, SpriteBatch
does not use the depth buffer. But it still gives each sprite quad a Z-position, which is specified by the layerDepth
parameter to SpriteBatch.Draw
.
The transformation specified in SpriteBatch.Begin
is applied after the sprite quad is positioned by Draw
, and before the projection.
So normally the valid range for layerDepth
is between 0 and 1 (because this falls in the raster volume). But if you apply a custom transformation that modifies the Z-axis of your sprites, the valid range of layerDepth
will change.