reckfellENGINE

LightOccluder2D

Occludes light cast by a Light2D, casting shadows.

On this page
class LightOccluder2DReckfellSharpInherits Entity2D

Occludes light cast by a Light2D, casting shadows.

Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an OccluderPolygon2D in order for the shadow to be computed.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

LightOccluder2DConstructor
# LightOccluder2D
C#
public LightOccluder2D();

Properties3

OccluderProperty
# Occluder
C#
public OccluderPolygon2D Occluder { get; set; }

The OccluderPolygon2D used to compute the shadow.

OccluderLightMaskProperty
# OccluderLightMask
C#
public int OccluderLightMask { get; set; }

Mask selecting this occluder for shadows. It intersects the light ShadowItemCullMask. Do not substitute the inherited CanvasItem.LightMask: OccluderLightMask is the mask passed to the renderer for this occluder. Configure visible geometry and physics collision separately.

SdfCollisionProperty
# SdfCollision
C#
public bool SdfCollision { get; set; }

If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders.

Methods6

GetOccluderLightMaskint
# GetOccluderLightMask
C#
public int GetOccluderLightMask();
Returns int
GetOccluderPolygonOccluderPolygon2D
# GetOccluderPolygon
C#
public OccluderPolygon2D GetOccluderPolygon();
Returns OccluderPolygon2D
IsSetAsSdfCollisionbool
# IsSetAsSdfCollision
C#
public bool IsSetAsSdfCollision();
Returns bool
SetAsSdfCollisionvoid
# SetAsSdfCollision
C#
public void SetAsSdfCollision(bool enable);
Parameters
NameTypeDefault
enablebool—
SetOccluderLightMaskvoid
# SetOccluderLightMask
C#
public void SetOccluderLightMask(int mask);
Parameters
NameTypeDefault
maskint—
SetOccluderPolygonvoid
# SetOccluderPolygon
C#
public void SetOccluderPolygon(OccluderPolygon2D polygon);
Parameters
NameTypeDefault
polygonOccluderPolygon2D—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.