Static methods

staticfromAsset(name:String):Array<FoxRenderPass>

Constructor

@:value({ _target : "default" })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

@:value("FoxRenderPass")name:String = "FoxRenderPass"

@:value("default")target:String = "default"

The name of the target FoxFramebuffer in the scene.

@:value([1, 1, 1, 1])clearColor:Array<Float> = [1, 1, 1, 1]

@:value(false)useCameraColor:Bool = false

@:value(true)clear:Bool = true

@:value(true)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

@:value(true)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.

@:value(true)enabled:Bool = true

@:value(null)shader:FoxShader = null

Shader to use for all models on this pass

@:value(null)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.

@:value([])groups:Array<Int> = []

@:value(new Rectangle())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.

@:value(new Rectangle())__shadowMapRegion:Rectangle = new Rectangle()

Render region for the shadow map.

Check region for details.

@:value(new Rectangle(0, 0, 0, 0))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.

private@:value(new Vector2())iResolution:Vector2 = new Vector2()

private@:value(new FoxDrawTreeNode(null))shadowNode:FoxDrawTreeNode = new FoxDrawTreeNode(null)

@:value(new FlxTypedSignalImpl())onPrePass:FlxTypedSignalImpl<() ‑> Void> = new FlxTypedSignalImpl()

@:value(new FlxTypedSignalImpl())onPostPass:FlxTypedSignalImpl<() ‑> Void> = new FlxTypedSignalImpl()

@:value(new FlxTypedSignalImpl())onShadowPrePass:FlxTypedSignalImpl<() ‑> Void> = new FlxTypedSignalImpl()

@:value(new FlxTypedSignalImpl())onShadowPostPass:FlxTypedSignalImpl<() ‑> Void> = new FlxTypedSignalImpl()

Methods

pass(camera:FoxCamera, drawGroups:Array<FoxDrawTree>, framebuffer:FoxFramebuffer):Void

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.

passShadowLights(lightData:FoxLightData, camera:FoxCamera, drawGroups:Array<FoxDrawTree>):Void

@:value({ samplerOffset : 0 })render(data:FoxDrawTreeNode, _shader:FoxShader, layers:FoxLayer, samplerOffset:Int = 0):Void

setGlobals(material:FoxMaterial, shader:FoxShader, camera:FoxCamera, framebuffer:FoxFramebuffer):Void