生成2D光影图的渲染流程

实现

构造函数

属性

lsTarget: RenderTexture[] = []
lsTargetAdd: RenderTexture[] = []
lsTargetSub: RenderTexture[] = []
name: string

An internal identifier used to find the manager by Scene3D.

��Scene3D�������ҹ��������ڲ����ơ�

occluderAgent: Occluder2DAgent
_config: Light2DConfig = ...
DEBUG: boolean = false
DIRECTION_LIGHT_SIZE: number = 20000
LIGHTANDSHADOW_SCENE_INV_0: number
LIGHTANDSHADOW_SCENE_INV_1: number
LIGHTANDSHADOW_STAGE_MAT_0: number
LIGHTANDSHADOW_STAGE_MAT_1: number
MAX_LAYER: number = 32
REUSE_CMD: boolean = true
REUSE_MESH: boolean = true
SCREEN_SCHMITT_SIZE: number = 200
SUPPORT_LIGHT_BLEND_MODE: boolean = true
SUPPORT_LIGHT_SCENE_MODE: boolean = true

访问器

方法

  • 参数

    • light: BaseLight2D

      Light object

    • oldLayerMask: number

      old mask layer

    • newLayerMask: number

      new mask layer

    返回 void

    light layer mask change

    灯光的影响层发生变化

  • 参数

    • light: BaseLight2D

      Light object

    • oldLayerMask: number

      old shadow mask layer

    • newLayerMask: number

      new shadow mask layer

    返回 void

    light shadow layer mark change

    灯光的阴影遮罩层发生变化

  • 参数

    • layerMask: number

      mask layer

    返回 void

    Need collect occluder in layers who effect lights

    是否需要收集各层中影响各灯光的遮光器