LightOccluder2D

继承: Node2D < CanvasItem < Node < Object

遮挡由 Light2D 投射的光线,投射阴影。

描述

遮挡 Light2D 投射的灯光,投射阴影。为了计算阴影,必须为 LightOccluder2D 提供 OccluderPolygon2D

教程

属性

OccluderPolygon2D

occluder

int

occluder_light_mask

1

bool

sdf_collision

true


属性说明

OccluderPolygon2D occluder

用于计算阴影的 OccluderPolygon2D


int occluder_light_mask = 1

  • void set_occluder_light_mask ( int value )

  • int get_occluder_light_mask ( )

LightOccluder2D 的遮挡器光照掩码。LightOccluder2D 将仅从具有相同光照掩码的 Light2D 投射阴影。


bool sdf_collision = true

  • void set_as_sdf_collision ( bool value )

  • bool is_set_as_sdf_collision ( )

如果启用,该遮挡器将成为实时生成的带符号距离场的一部分,可被用于自定义着色器中。

Previous Next


© 版权所有 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0). Revision b1c660f7.

Built with Sphinx using a theme provided by Read the Docs.