b3dEntityCastShadow

Enables or disables shadow casting for an entity. Takes entity (entity handle from b3dLoadMesh/b3dCreateBox/etc), enable (1 = cast shadows, 0 = no shadows). Returns nothing.

3D Graphics

Parameters & Returns

Parameters

entity Int
enable Int

Returns

Void

Quick Summary

Enables or disables shadow casting for an entity. Takes entity (entity handle from b3dLoadMesh/b3dCreateBox/etc), enable (1 = cast shadows, 0 = no shadows). Returns nothing.

Technical Exegesis...

Enables or disables shadow casting for an entity. Takes entity (entity handle from b3dLoadMesh, b3dCreateBox, or other entity creation function), enable (1 to enable shadow casting, 0 to disable shadow casting). Returns nothing. Controls whether entity casts shadows onto other objects when lit by shadow-casting lights. Affects DirectX 12 shadow map rendering.

Example

Example.bam
; Enable shadow casting on main character
player = b3dLoadMesh("character.glb", 1, 0)
b3dEntityCastShadow(player, 1)

; Disable shadow casting on skybox
sky = b3dLoadMesh("skybox.glb", 1, 0)
b3dEntityCastShadow(sky, 0)

; Disable shadows on particle effects
For i = 0 To 99
    particle = b3dCreateBox()
    b3dEntityCastShadow(particle, 0)
Next