class FoxRenderPass
package foxlite.renderer
Static methods
Constructor
new(?drawGroups:Array<Int>, _target:String = "default", ?properties:Dynamic)
Creates a new render pass
Parameters:
drawGroups | The groups that will be drawn by this pass |
|---|---|
target | The FoxScene's Render Target name |
properties | (Optional) Pass an object to initialize the pass properties |
Variables
clearShadowMap:Bool = true
If true, it will clear the shadow map before rendering shadows. If you have objects split in 2 passes, set this to false to prevent clearing the previous rendered objects' shadow texture
clearDepthAndStencil:Bool = true
Wheter or not to clear the depth and stencil buffers.
Note: This only works when clear is false, as clearing those buffers are essential for 3D rendering.
material:FoxMaterial = null
If set, everything will be drawn using this material,
the shader on the original material WILL be used, unless
shader is set in this pass.
region:Rectangle = new Rectangle()
This is the portion of the screen where contents will be rendered.
Useful if you want to offset the screen, scale it or create split screens in a single render texture.
Call setEmpty() to use the framebuffer size (only applies to attachment 0)
Note: By default, the region starts at the bottom left of the screen, as opposed to Flixel's top right.
__shadowMapRegion:Rectangle = new Rectangle()
Render region for the shadow map.
Check region for details.
scissor:Rectangle = new Rectangle(0, 0, 0, 0)
This is the portion of the screen that will be clipped for rendering.
Note: This option is not implemented yet.
Methods
shadowPass(light:FoxBaseLight, camera:FoxCamera, drawGroups:Array<FoxDrawTree>, shadowFramebuffer:FoxFramebuffer):Void
Renders all models in shadow mode, this makes use of the SHADOW_PASS preprocessor
in the shaders, and lights matrices.