Skip to content

Why Skybox's geometry only uses three vertices? #6970

Answered by romainguy
zy4944796 asked this question in Q&A
Discussion options

You must be logged in to vote

There's no need to build a cube. We use a single triangle that covers the entire screen and compute the view direction at each fragment in the shader (we do this in the vertex shader). That view direction is all that's needed to sample the cubemap.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zy4944796
Comment options

Answer selected by zy4944796
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants