-
Notifications
You must be signed in to change notification settings - Fork 1
FullScreenRenderer
Alexander Orzechowski edited this page Oct 20, 2015
·
2 revisions
This is a renderer that is commonly extended and provides a full screen quad to render to. This quad is commonly used to render a full screen texture so post processing is possible.
DISCLAIMER: The quad may not be acually fullscreen. See the .setAspect()
function.
Extends: Tessellator.RendererAbstract
###Constructor
-
Tessellator.FullScreenRenderer(Tessellator.Program shader)
Constructs a newTessellator.FullScreenRenderer
. It will create a internal.object
property that is the full screen quad. - ARGUMENT shader: Gets passed down to the
Tessellator.RendererAbstract
.
###Properties
-
.setAspect(float aspect)
Sets the aspect ratio of the quad instead of being inherited from the resolution of the rendering target. This is done by setting a uniform within the shader. If a special vertex shader was provided, it may not implement this feature. - ARGUMENT aspect: The new aspect that the ```fullscreen` quad can be.
###Internal
-
.unifyAspect()
Calculates the vec2 aspect uniform sent to the shader according to the set aspect ratio. Automatically called from the.renderRaw()
function. It may need to be called manually when extending this function.
###Unifroms
-
aspect
This is a vec2 normal at 0 so that when the vec2 is set to (0, 0) the quad will be truly full screen. Otherwise, an element of the vector may be a fraction(0 < x < 1)
that is the percentage (or coefficient) of how much of the screen the quad fill in a certain axis. - NOTE: Since the vector is normal at 0, the range that the uniform can be is
(0 < x < 1) - 1
or(-1 < x < 0)
-
source
Tessellator-
renderers
RendererAbstract
ModelRenderer
BufferedRenderer FullScreenRenderer -
shaders
Shader
Program
RenderMatrix -
geometry
Object
-