Documentation ¶
Overview ¶
Package GeometryInstance3D provides methods for working with GeometryInstance3D object instances.
Index ¶
- type Advanced
- type Any
- type GIMode
- type Instance
- func (self Instance) AsGeometryInstance3D() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) CastShadow() gdclass.GeometryInstance3DShadowCastingSetting
- func (self Instance) CustomAabb() AABB.PositionSize
- func (self Instance) ExtraCullMargin() Float.X
- func (self Instance) GetInstanceShaderParameter(name string) any
- func (self Instance) GiLightmapScale() gdclass.GeometryInstance3DLightmapScale
- func (self Instance) GiMode() gdclass.GeometryInstance3DGIMode
- func (self Instance) IgnoreOcclusionCulling() bool
- func (self Instance) LodBias() Float.X
- func (self Instance) MaterialOverlay() [1]gdclass.Material
- func (self Instance) MaterialOverride() [1]gdclass.Material
- func (self Instance) SetCastShadow(value gdclass.GeometryInstance3DShadowCastingSetting)
- func (self Instance) SetCustomAabb(value AABB.PositionSize)
- func (self Instance) SetExtraCullMargin(value Float.X)
- func (self Instance) SetGiLightmapScale(value gdclass.GeometryInstance3DLightmapScale)
- func (self Instance) SetGiMode(value gdclass.GeometryInstance3DGIMode)
- func (self Instance) SetIgnoreOcclusionCulling(value bool)
- func (self Instance) SetInstanceShaderParameter(name string, value any)
- func (self Instance) SetLodBias(value Float.X)
- func (self Instance) SetMaterialOverlay(value [1]gdclass.Material)
- func (self Instance) SetMaterialOverride(value [1]gdclass.Material)
- func (self Instance) SetTransparency(value Float.X)
- func (self Instance) SetVisibilityRangeBegin(value Float.X)
- func (self Instance) SetVisibilityRangeBeginMargin(value Float.X)
- func (self Instance) SetVisibilityRangeEnd(value Float.X)
- func (self Instance) SetVisibilityRangeEndMargin(value Float.X)
- func (self Instance) SetVisibilityRangeFadeMode(value gdclass.GeometryInstance3DVisibilityRangeFadeMode)
- func (self Instance) Transparency() Float.X
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) VisibilityRangeBegin() Float.X
- func (self Instance) VisibilityRangeBeginMargin() Float.X
- func (self Instance) VisibilityRangeEnd() Float.X
- func (self Instance) VisibilityRangeEndMargin() Float.X
- func (self Instance) VisibilityRangeFadeMode() gdclass.GeometryInstance3DVisibilityRangeFadeMode
- type LightmapScale
- type ShadowCastingSetting
- type VisibilityRangeFadeMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type GIMode ¶
type GIMode = gdclass.GeometryInstance3DGIMode //gd:GeometryInstance3D.GIMode
const ( /*Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using [VoxelGI] and SDFGI, the geometry will [i]receive[/i] indirect lighting and reflections but the geometry will not be considered in GI baking.*/ GiModeDisabled GIMode = 0 /*Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using [VoxelGI], SDFGI and [LightmapGI].*/ GiModeStatic GIMode = 1 /*Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using [VoxelGI], but it has a higher performance impact than [constant GI_MODE_STATIC]. When using other GI methods, this will act the same as [constant GI_MODE_DISABLED]. When using [LightmapGI], the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture.*/ GiModeDynamic GIMode = 2 )
type Instance ¶
type Instance [1]gdclass.GeometryInstance3D
Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsGeometryInstance3D ¶
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) CastShadow ¶
func (self Instance) CastShadow() gdclass.GeometryInstance3DShadowCastingSetting
func (Instance) CustomAabb ¶
func (self Instance) CustomAabb() AABB.PositionSize
func (Instance) ExtraCullMargin ¶
func (Instance) GetInstanceShaderParameter ¶
Get the value of a shader parameter as set on this instance.
func (Instance) GiLightmapScale ¶
func (self Instance) GiLightmapScale() gdclass.GeometryInstance3DLightmapScale
func (Instance) GiMode ¶
func (self Instance) GiMode() gdclass.GeometryInstance3DGIMode
func (Instance) IgnoreOcclusionCulling ¶
func (Instance) MaterialOverlay ¶
func (Instance) MaterialOverride ¶
func (Instance) SetCastShadow ¶
func (self Instance) SetCastShadow(value gdclass.GeometryInstance3DShadowCastingSetting)
func (Instance) SetCustomAabb ¶
func (self Instance) SetCustomAabb(value AABB.PositionSize)
func (Instance) SetExtraCullMargin ¶
func (Instance) SetGiLightmapScale ¶
func (self Instance) SetGiLightmapScale(value gdclass.GeometryInstance3DLightmapScale)
func (Instance) SetGiMode ¶
func (self Instance) SetGiMode(value gdclass.GeometryInstance3DGIMode)
func (Instance) SetIgnoreOcclusionCulling ¶
func (Instance) SetInstanceShaderParameter ¶
Set the value of a shader uniform for this instance only ([url=$DOCS_URL/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms]per-instance uniform[/url]). See also [method ShaderMaterial.set_shader_parameter] to assign a uniform on all instances using the same [ShaderMaterial]. [b]Note:[/b] For a shader uniform to be assignable on a per-instance basis, it [i]must[/i] be defined with [code]instance uniform ...[/code] rather than [code]uniform ...[/code] in the shader code. [b]Note:[/b] [param name] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). [b]Note:[/b] Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method.
func (Instance) SetLodBias ¶
func (Instance) SetMaterialOverlay ¶
func (Instance) SetMaterialOverride ¶
func (Instance) SetTransparency ¶
func (Instance) SetVisibilityRangeBegin ¶
func (Instance) SetVisibilityRangeBeginMargin ¶
func (Instance) SetVisibilityRangeEnd ¶
func (Instance) SetVisibilityRangeEndMargin ¶
func (Instance) SetVisibilityRangeFadeMode ¶
func (self Instance) SetVisibilityRangeFadeMode(value gdclass.GeometryInstance3DVisibilityRangeFadeMode)
func (Instance) Transparency ¶
func (*Instance) UnsafePointer ¶
func (Instance) VisibilityRangeBegin ¶
func (Instance) VisibilityRangeBeginMargin ¶
func (Instance) VisibilityRangeEnd ¶
func (Instance) VisibilityRangeEndMargin ¶
func (Instance) VisibilityRangeFadeMode ¶
func (self Instance) VisibilityRangeFadeMode() gdclass.GeometryInstance3DVisibilityRangeFadeMode
type LightmapScale ¶
type LightmapScale = gdclass.GeometryInstance3DLightmapScale //gd:GeometryInstance3D.LightmapScale
const ( /*The standard texel density for lightmapping with [LightmapGI].*/ LightmapScale1x LightmapScale = 0 /*Multiplies texel density by 2× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0.*/ LightmapScale2x LightmapScale = 1 /*Multiplies texel density by 4× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0.*/ LightmapScale4x LightmapScale = 2 /*Multiplies texel density by 8× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0.*/ LightmapScale8x LightmapScale = 3 /*Represents the size of the [enum LightmapScale] enum.*/ LightmapScaleMax LightmapScale = 4 )
type ShadowCastingSetting ¶
type ShadowCastingSetting = gdclass.GeometryInstance3DShadowCastingSetting //gd:GeometryInstance3D.ShadowCastingSetting
const ( /*Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).*/ ShadowCastingSettingOff ShadowCastingSetting = 0 /*Will cast shadows from all visible faces in the GeometryInstance3D. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.*/ ShadowCastingSettingOn ShadowCastingSetting = 1 /*Will cast shadows from all visible faces in the GeometryInstance3D. Will not take culling into account, so all faces will be taken into account when shadow casting.*/ ShadowCastingSettingDoubleSided ShadowCastingSetting = 2 /*Will only show the shadows casted from this object. In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.*/ ShadowCastingSettingShadowsOnly ShadowCastingSetting = 3 )
type VisibilityRangeFadeMode ¶
type VisibilityRangeFadeMode = gdclass.GeometryInstance3DVisibilityRangeFadeMode //gd:GeometryInstance3D.VisibilityRangeFadeMode
const ( /*Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.*/ VisibilityRangeFadeDisabled VisibilityRangeFadeMode = 0 /*Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin]. [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled.*/ VisibilityRangeFadeSelf VisibilityRangeFadeMode = 1 /*Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin]. [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled.*/ VisibilityRangeFadeDependencies VisibilityRangeFadeMode = 2 )