Decal

package
v0.0.0-...-5fa07e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package Decal provides methods for working with Decal object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsDecal() Instance
}

type DecalTexture

type DecalTexture = gdclass.DecalDecalTexture //gd:Decal.DecalTexture
const (
	/*[Texture2D] corresponding to [member texture_albedo].*/
	TextureAlbedo DecalTexture = 0
	/*[Texture2D] corresponding to [member texture_normal].*/
	TextureNormal DecalTexture = 1
	/*[Texture2D] corresponding to [member texture_orm].*/
	TextureOrm DecalTexture = 2
	/*[Texture2D] corresponding to [member texture_emission].*/
	TextureEmission DecalTexture = 3
	/*Max size of [enum DecalTexture] enum.*/
	TextureMax DecalTexture = 4
)

type Instance

type Instance [1]gdclass.Decal

[Decal]s are used to project a texture onto a [Mesh] in the scene. Use Decals to add detail to a scene without affecting the underlying [Mesh]. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots. They are made of an [AABB] and a group of [Texture2D]s specifying [Color], normal, ORM (ambient occlusion, roughness, metallic), and emission. Decals are projected within their [AABB] so altering the orientation of the Decal affects the direction in which they are projected. By default, Decals are projected down (i.e. from positive Y to negative Y). The [Texture2D]s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a post-processing effect after. [b]Note:[/b] Decals cannot affect an underlying material's transparency, regardless of its transparency mode (alpha blend, alpha scissor, alpha hash, opaque pre-pass). This means translucent or transparent areas of a material will remain translucent or transparent even if an opaque decal is applied on them. [b]Note:[/b] Decals are only supported in the Forward+ and Mobile rendering methods, not Compatibility. When using the Mobile rendering method, only 8 decals can be displayed on each mesh resource. Attempting to display more than 8 decals on a single mesh resource will result in decals flickering in and out as the camera moves. [b]Note:[/b] When using the Mobile rendering method, decals will only correctly affect meshes whose visibility AABB intersects with the decal's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, [member GeometryInstance3D.extra_cull_margin] must be increased on the mesh. Otherwise, the decal may not be visible on the mesh.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AlbedoMix

func (self Instance) AlbedoMix() Float.X

func (Instance) AsDecal

func (self Instance) AsDecal() Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsVisualInstance3D

func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance

func (Instance) CullMask

func (self Instance) CullMask() int

func (Instance) DistanceFadeBegin

func (self Instance) DistanceFadeBegin() Float.X

func (Instance) DistanceFadeEnabled

func (self Instance) DistanceFadeEnabled() bool

func (Instance) DistanceFadeLength

func (self Instance) DistanceFadeLength() Float.X

func (Instance) EmissionEnergy

func (self Instance) EmissionEnergy() Float.X

func (Instance) LowerFade

func (self Instance) LowerFade() Float.X

func (Instance) Modulate

func (self Instance) Modulate() Color.RGBA

func (Instance) NormalFade

func (self Instance) NormalFade() Float.X

func (Instance) SetAlbedoMix

func (self Instance) SetAlbedoMix(value Float.X)

func (Instance) SetCullMask

func (self Instance) SetCullMask(value int)

func (Instance) SetDistanceFadeBegin

func (self Instance) SetDistanceFadeBegin(value Float.X)

func (Instance) SetDistanceFadeEnabled

func (self Instance) SetDistanceFadeEnabled(value bool)

func (Instance) SetDistanceFadeLength

func (self Instance) SetDistanceFadeLength(value Float.X)

func (Instance) SetEmissionEnergy

func (self Instance) SetEmissionEnergy(value Float.X)

func (Instance) SetLowerFade

func (self Instance) SetLowerFade(value Float.X)

func (Instance) SetModulate

func (self Instance) SetModulate(value Color.RGBA)

func (Instance) SetNormalFade

func (self Instance) SetNormalFade(value Float.X)

func (Instance) SetSize

func (self Instance) SetSize(value Vector3.XYZ)

func (Instance) SetTextureAlbedo

func (self Instance) SetTextureAlbedo(value [1]gdclass.Texture2D)

func (Instance) SetTextureEmission

func (self Instance) SetTextureEmission(value [1]gdclass.Texture2D)

func (Instance) SetTextureNormal

func (self Instance) SetTextureNormal(value [1]gdclass.Texture2D)

func (Instance) SetTextureOrm

func (self Instance) SetTextureOrm(value [1]gdclass.Texture2D)

func (Instance) SetUpperFade

func (self Instance) SetUpperFade(value Float.X)

func (Instance) Size

func (self Instance) Size() Vector3.XYZ

func (Instance) TextureAlbedo

func (self Instance) TextureAlbedo() [1]gdclass.Texture2D

func (Instance) TextureEmission

func (self Instance) TextureEmission() [1]gdclass.Texture2D

func (Instance) TextureNormal

func (self Instance) TextureNormal() [1]gdclass.Texture2D

func (Instance) TextureOrm

func (self Instance) TextureOrm() [1]gdclass.Texture2D

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) UpperFade

func (self Instance) UpperFade() Float.X

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL