Skip to content

Commit 16d7cd8

Browse files
authored
Add note explaining PointClamp in SpriteBatch.Begin (#257)
1 parent d14496d commit 16d7cd8

File tree

1 file changed

+5
-0
lines changed
  • articles/tutorials/building_2d_games/07_optimizing_texture_rendering

1 file changed

+5
-0
lines changed

articles/tutorials/building_2d_games/07_optimizing_texture_rendering/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ First, we will explore creating the texture atlas and defining the texture regio
199199

200200
[!code-csharp[](./snippets/game1/textureatlas_usage.cs?highlight=5,11-15,31-47,65-75)]
201201

202+
> [!NOTE]
203+
> This example uses `SamplerState.PointClamp` in `SpriteBatch.Begin(...)`. `PointClamp` keeps scaled pixel art sharp.
204+
>
205+
> For more details, see <xref:Microsoft.Xna.Framework.Graphics.SamplerState>.
206+
202207
The key changes in this implementation are:
203208

204209
1. The `_logo` field was removed.

0 commit comments

Comments
 (0)