mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Mention the need for Flip Faces when using QuadMesh for post-processing (#6818)
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
co-authored by
Hugo Locurcio
parent
16eacf62c8
commit
c591c416e2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user