Documentation ¶
Overview ¶
Package Material provides methods for working with Material object instances.
Index ¶
- type Advanced
- type Any
- type Implementation
- type Instance
- func (self Instance) AsMaterial() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) CreatePlaceholder() [1]gdclass.Resource
- func (self Instance) InspectNativeShaderCode()
- func (self Instance) NextPass() [1]gdclass.Material
- func (self Instance) RenderPriority() int
- func (self Instance) SetNextPass(value [1]gdclass.Material)
- func (self Instance) SetRenderPriority(value int)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
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 Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
[Material] is a base resource used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a [Material]. A few flags and parameters are shared between all material types and are configured here. Importantly, you can inherit from [Material] to create your own custom material type in script or in GDExtension.
See [Interface] for methods that can be overridden by a [Class] that extends it.
%!(EXTRA string=Material)
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsMaterial ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) CreatePlaceholder ¶
Creates a placeholder version of this resource ([PlaceholderMaterial]).
func (Instance) InspectNativeShaderCode ¶
func (self Instance) InspectNativeShaderCode()
Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code.
func (Instance) RenderPriority ¶
func (Instance) SetNextPass ¶
func (Instance) SetRenderPriority ¶
func (*Instance) UnsafePointer ¶
type Interface ¶
type Interface interface { //Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the [Material]'s [Shader]. GetShaderRid() RID.Any //Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. GetShaderMode() gdclass.ShaderMode //Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member next_pass] should be shown in the editor or not. CanDoNextPass() bool //Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member render_priority] should be shown in the editor or not. CanUseRenderPriority() bool }