ShadowCastingSetting
GeometryInstance3D.swift:19enum ShadowCastingSettingenum ShadowCastingSettings10SwiftGodot18GeometryInstance3DC20ShadowCastingSettingO What are these?3YARBimport SwiftGodotFramework to write Godot Game Extensions using the Swift Programming Language.
class GeometryInstance3DBase node for geometry-based visual instances.
case offWill not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).
case onWill cast shadows from all visible faces in the GeometryInstance3D.
case doubleSidedWill cast shadows from all visible faces in the GeometryInstance3D.
case shadowsOnlyWill only show the shadows casted from this object.
override class var godotClassName: StringName { get }final var castShadow: GeometryInstance3D.ShadowCastingSetting { get set }The selected shadow casting flag. See ShadowCastingSetting for possible values.
final var customAabb: AABB { get set }Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive AABB recalculation that happens when a skeleton is used with a MeshInstance3D or to have precise control over the MeshInstance3D’s bounding box. To use the default AABB, set value to an AABB with all fields set to 0.0. To avoid frustum culling, set customAabb to a very large AABB that covers your entire game world such as AABB(-10000, -10000, -10000, 20000, 20000, 20000). To disable all forms of culling (including occlusion culling), call instanceSetIgnoreCulling(instance:enabled:) on the GeometryInstance3D’s RID.
final var extraCullMargin: Double { get set }The extra distance added to the GeometryInstance3D’s bounding box (AABB) to increase its cull box.
final var giLightmapScale: GeometryInstance3D.LightmapScale { get set }The texel density to use for lightmapping in LightmapGI. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes.
final var giMode: GeometryInstance3D.GIMode { get set }The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic).
final var ignoreOcclusionCulling: Bool { get set }If true, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use.
final var lodBias: Double { get set }Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances.
final var materialOverlay: Material? { get set }The material overlay for the whole geometry.
final var materialOverride: Material? { get set }The material override for the whole geometry.
final var transparency: Double { get set }The transparency applied to the whole geometry (as a multiplier of the materials’ existing transparency). 0.0 is fully opaque, while 1.0 is fully transparent. Values greater than 0.0 (exclusive) will force the geometry’s materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting transparency to a value greater than 0.0 (exclusive) will not disable shadow rendering.
final var visibilityRangeBegin: Double { get set }Starting distance from which the GeometryInstance3D will be visible, taking visibilityRangeBeginMargin into account as well. The default value of 0 is used to disable the range check.
final var visibilityRangeBeginMargin: Double { get set }Margin for the visibilityRangeBegin threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the visibilityRangeBegin threshold by this amount.
final var visibilityRangeEnd: Double { get set }Distance from which the GeometryInstance3D will be hidden, taking visibilityRangeEndMargin into account as well. The default value of 0 is used to disable the range check.
final var visibilityRangeEndMargin: Double { get set }Margin for the visibilityRangeEnd threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the visibilityRangeEnd threshold by this amount.
final var visibilityRangeFadeMode: GeometryInstance3D.VisibilityRangeFadeMode { get set }Controls which instances will be faded when approaching the limits of the visibility range. See VisibilityRangeFadeMode for possible values.
final func getInstanceShaderParameter(name: StringName) -> Variant Get the value of a shader parameter as set on this instance.
final func setInstanceShaderParameter(name: StringName, value: Variant) Set the value of a shader uniform for this instance only (per-instance uniform). See also setShaderParameter(param:value:) to assign a uniform on all instances using the same ShaderMaterial.
enum GIModeenum LightmapScaleenum VisibilityRangeFadeModeclass MeshInstance3DNode that instances meshes into a scenario.
protocol CaseIterableA type that provides a collection of all of its values.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
init?(rawValue: Int64) var debugDescription: String { get }A textual representation of this instance, suitable for debugging
var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)