Sign in to follow this  

full screen quad

This topic is 2547 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A quadrangle is a four sided shape with four vertices.

A full screen quadrangle has its four vertices at each corner of the screen.

Screen coordinates are as follows:


public static readonly VertexPositionTexture[] Vertices_NearPlane = new VertexPositionTexture[4]
{
/*
* (-1,1)-----------(1,1) [x]: -1 -----> 1
* | |
* | | [y]: 1
* | (0,0) | |
* | | |
* | | |
* (-1,-1)__________(1,-1) -1
*/


// Screen X,Y coordinatates go from (-1,1) [Top Left] to (1,-1) [Bottom Right]
// .Z coordinate of 0 = Draw on near clipping plane (as close to camera as possible)
new VertexPositionTexture(new Vector3(-1f, 1f, 0f), new Vector2(0f, 0f)), // Top Left
new VertexPositionTexture(new Vector3(1f, 1f, 0f), new Vector2(1f, 0f)), // Top Right
new VertexPositionTexture(new Vector3(-1f, -1f, 0f), new Vector2(0f, 1f)), // Bottom Left
new VertexPositionTexture(new Vector3(1f, -1f, 0f), new Vector2(1f, 1f)) // Bottom Right
};



Hope that helps. :)

Share this post


Link to post
Share on other sites
A quad is a rectangle. A fullscreen quad is a rectangle covering the entire screen. So if you draw a textured fullscreen quad, then the texture image will simply be stretched to cover the entire screen.
If you draw a fullscreen quad with a pixel shader, the pixel shader will be executed for every pixel on the screen.

Share this post


Link to post
Share on other sites
I'm just being a little fussy, but the term "quad" is used pretty loosely in the graphics community. "Quad" comes from quadrilaterial which means it has 4 sides (the sides are not necessarily perpendicular to one another), as Sp8nky mentioned. So, strictly speaking, a rectangle is a quadrilaterial but a quadrilateral may or may not be a rectangle.

However, in the graphics community, when someone describes something as a "quad," they quite often mean "rectangle" instead. Because "full-screen" implies a rectangle (most screens are rectangular), "full screen quad" is rectangle that completely fills the screen.

Share this post


Link to post
Share on other sites

This topic is 2547 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this