From c591c416e2d13903d782610e4152a82c576dcca2 Mon Sep 17 00:00:00 2001 From: Clay John Date: Fri, 24 Feb 2023 14:24:06 -0800 Subject: [PATCH] Mention the need for Flip Faces when using QuadMesh for post-processing (#6818) Co-authored-by: Hugo Locurcio --- tutorials/shaders/advanced_postprocessing.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tutorials/shaders/advanced_postprocessing.rst b/tutorials/shaders/advanced_postprocessing.rst index 0980214c8..c59db925e 100644 --- a/tutorials/shaders/advanced_postprocessing.rst +++ b/tutorials/shaders/advanced_postprocessing.rst @@ -33,13 +33,14 @@ shader and to access the depth texture of the scene. Next, use a vertex shader to make the quad cover the screen at all times so that the post-processing effect will be applied at all times, including in the editor. -First, create a new MeshInstance3D and set its mesh to a QuadMesh. This creates a quad -centered at position ``(0, 0, 0)`` with a width and height of ``1``. Set the width -and height to ``2``. Right now, the quad occupies a position in world space at the -origin; however, we want it to move with the camera so that it always covers the -entire screen. To do this, we will bypass the coordinate transforms that translate -the vertex positions through the difference coordinate spaces and treat the vertices -as if they were already in clip space. +First, create a new MeshInstance3D and set its mesh to a QuadMesh. This creates +a quad centered at position ``(0, 0, 0)`` with a width and height of ``1``. Set +the width and height to ``2`` and enable **Flip Faces**. Right now, the quad +occupies a position in world space at the origin. However, we want it to move +with the camera so that it always covers the entire screen. To do this, we will +bypass the coordinate transforms that translate the vertex positions through the +difference coordinate spaces and treat the vertices as if they were already in +clip space. The vertex shader expects coordinates to be output in clip space, which are coordinates ranging from ``-1`` at the left and bottom of the screen to ``1`` at the top and right