Material

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package Material provides methods for working with Material 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
	AsMaterial() Instance
}

type Implementation

type Implementation = implementation

Implementation implements Interface with empty methods.

type Instance

type Instance [1]gdclass.Material

[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 New

func New() Instance

func (Instance) AsMaterial

func (self Instance) AsMaterial() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) CreatePlaceholder

func (self Instance) CreatePlaceholder() [1]gdclass.Resource

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) NextPass

func (self Instance) NextPass() [1]gdclass.Material

func (Instance) RenderPriority

func (self Instance) RenderPriority() int

func (Instance) SetNextPass

func (self Instance) SetNextPass(value [1]gdclass.Material)

func (Instance) SetRenderPriority

func (self Instance) SetRenderPriority(value int)

func (*Instance) UnsafePointer

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

func (Instance) Virtual

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

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
}

Jump to

Keyboard shortcuts

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