Skip to content

Commit c5ec5a9

Browse files
committed
tracking 8.3; render target null
1 parent 1beda0a commit c5ec5a9

File tree

1 file changed

+6
-1
lines changed
  • articles/tutorials/advanced/2d_shaders/08_light_effect

1 file changed

+6
-1
lines changed

articles/tutorials/advanced/2d_shaders/08_light_effect/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ The `ColorBuffer` property is a [`RenderTarget2D`](xref:Microsoft.Xna.Framework.
4343

4444
[!code-csharp[](./snippets/snippet-8-02.cs)]
4545

46-
Once all of the rendering is complete, we need to switch the primary render target back to the _screen_ so that we can actually see anything. Add the following method to the `DeferredRenderer` class. Note that `null` is a special value when it comes to `RenderTarget2D`s. `null` translates to "the screen":
46+
Once all of the rendering is complete, we need to switch the primary render target back to the _screen_ so that we can actually see anything. Add the following method to the `DeferredRenderer` class.
47+
48+
> [!note]
49+
> Set the render target to `null` to draw to the screen.
50+
>
51+
> `RenderTarget`s are off-screen buffers that MonoGame can draw graphics into. If the render target is `null`, then there is no off-screen buffer to use, and as such, the only place to render the graphics are directly to the screen.
4752
4853
[!code-csharp[](./snippets/snippet-8-03.cs)]
4954

0 commit comments

Comments
 (0)