Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
Mode
Shader.swift:22enum Mode
Cases
case spatial
Mode used to draw all 3D objects.
case canvasItem
Mode used to draw all 2D objects.
case particles
Mode used to calculate particle information on a per-particle basis. Not used for drawing.
case sky
Mode used for drawing skies. Only works with shaders attached to
Sky
objects.case fog
Mode used for setting the color and density of volumetric fog effect.
Other members in extension
Type members
Instance members
var code: String
Returns the shader’s code as the user has written it, not the full generated code used internally.
func getDefaultTextureParameter(name: StringName, index: Int32
) -> Texture2D? Returns the texture that is set as default for the specified parameter.
func getMode(
) -> Shader.Mode Returns the shader mode for the shader.
func getShaderUniformList(getGroups: Bool
) -> GArray Get the list of shader uniforms that can be assigned to a
ShaderMaterial
, for use withsetShaderParameter(param:value:)
andgetShaderParameter(param:)
. The parameters returned are contained in dictionaries in a similar format to the ones returned bygetPropertyList
.func setDefaultTextureParameter(name: StringName, texture: Texture2D?, index: Int32
) Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the
ShaderMaterial
.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A 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.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.