Static variables

@:value(4)staticfinalinlineread onlyMAX_DIRECTIONAL_LIGHTS:Int = 4

@:value(16)staticfinalinlineread onlyMAX_POINT_LIGHTS:Int = 16

@:value(8)staticfinalinlineread onlyMAX_SPOT_LIGHTS:Int = 8

@:value(8)staticfinalinlineread onlyMAX_AREA_LIGHTS:Int = 8

Static methods

staticstaticInit():Void

Constructor

new()

Variables

@:value([])finaldirectionalLights:Array<FoxDirectionalLight> = []

@:value(new BalancedTree())finalorderedPointLights:BalancedTree<Float, FoxPointLight> = new BalancedTree()

@:value(new BalancedTree())finalorderedSpotLights:BalancedTree<Float, FoxSpotLight> = new BalancedTree()

@:value(new BalancedTree())finalorderedAreaLights:BalancedTree<Float, FoxAreaLight> = new BalancedTree()

@:value([])finalshadowLights:Array<FoxBaseLight> = []

@:value([])finalpointLightBuffer:Array<UniformPointLight> = []

@:value([])finalspotLightBuffer:Array<UniformSpotLight> = []

@:value([])finalareaLightBuffer:Array<UniformAreaLight> = []

@:value([0, 0, 0, 0])lightCount:Array<Int> = [0, 0, 0, 0]

@:value(new FoxTextureBuffer((MAX_DIRECTIONAL_LIGHTS + MAX_SPOT_LIGHTS) * 4, 4))shadowCasterData:FoxTextureBuffer = new FoxTextureBuffer((MAX_DIRECTIONAL_LIGHTS + MAX_SPOT_LIGHTS) * 4, 4)

@:value(FoxFramebuffer.createShadowMap(2, 2))directionalShadowAtlas:FoxFramebuffer = FoxFramebuffer.createShadowMap(2, 2)

@:value(FoxFramebuffer.createShadowMap(2, 2))spotShadowAtlas:FoxFramebuffer = FoxFramebuffer.createShadowMap(2, 2)

@:value(4096)shadowMapMaxWidth:Int = 4096

The max width of the whole shadowMapAtlas. The shadowmap will expand to this size.

@:value(4096)shadowMapMaxHeight:Int = 4096

The max height of the whole shadowMapAtlas. The shadowmap will expand to this size.

@:value(1024)directionalLightShadowMapSize:Int = 1024

The size of light shadowmap atlas. Must be a PowerOf2 for optimal packing. This also limits the number of shadows you can have based on how many regions can be packed inside the shadow map atlas.

In short, this is the 'Shadow texture size' for each light, but the bigger it is, the less shadows you can have.

@:value(0)tiles0:Int = 0

Calculated tiles for directional lights.

This value is result of Math.floor(shadowMapMaxWidth / directionalLightShadowMapSize)

@:value(512)pointLightShadowMapSize:Int = 512

The size of light shadowmap atlas. Must be a PowerOf2 for optimal packing. This also limits the number of shadows you can have based on how many regions can be packed inside the shadow map atlas.

In short, this is the 'Shadow texture size' for each light, but the bigger it is, the less shadows you can have.

@:value(0)tiles1:Int = 0

Calculated tiles for point lights.

This value is result of Math.floor(shadowMapMaxWidth / pointLightShadowMapSize)

@:value(512)spotLightShadowMapSize:Int = 512

The size of light shadowmap atlas. Must be a PowerOf2 for optimal packing. This also limits the number of shadows you can have based on how many regions can be packed inside the shadow map atlas.

In short, this is the 'Shadow texture size' for each light, but the bigger it is, the less shadows you can have.

@:value(0)tiles2:Int = 0

Calculated tiles for point lights.

This value is result of Math.floor(shadowMapMaxWidth / spotLightShadowMapSize)

Methods