SpatialMaterial

Default 3D rendering material.

This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.

@GodotBaseClass
struct SpatialMaterial {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

BillboardMode
enum BillboardMode
BlendMode
enum BlendMode
Constants
enum Constants
CullMode
enum CullMode
DepthDrawMode
enum DepthDrawMode
DetailUV
enum DetailUV
DiffuseMode
enum DiffuseMode
DistanceFadeMode
enum DistanceFadeMode
EmissionOperator
enum EmissionOperator
Feature
enum Feature
Flags
enum Flags
SpecularMode
enum SpecularMode
TextureChannel
enum TextureChannel
TextureParam
enum TextureParam

Functions

getAlbedo
Color getAlbedo()
getAlphaScissorThreshold
double getAlphaScissorThreshold()
getAnisotropy
double getAnisotropy()
getAoLightAffect
double getAoLightAffect()
getAoTextureChannel
SpatialMaterial.TextureChannel getAoTextureChannel()
getBillboardMode
SpatialMaterial.BillboardMode getBillboardMode()
getBlendMode
SpatialMaterial.BlendMode getBlendMode()
getClearcoat
double getClearcoat()
getClearcoatGloss
double getClearcoatGloss()
getCullMode
SpatialMaterial.CullMode getCullMode()
getDepthDeepParallaxFlipBinormal
bool getDepthDeepParallaxFlipBinormal()
getDepthDeepParallaxFlipTangent
bool getDepthDeepParallaxFlipTangent()
getDepthDeepParallaxMaxLayers
long getDepthDeepParallaxMaxLayers()
getDepthDeepParallaxMinLayers
long getDepthDeepParallaxMinLayers()
getDepthDrawMode
SpatialMaterial.DepthDrawMode getDepthDrawMode()
getDepthScale
double getDepthScale()
getDetailBlendMode
SpatialMaterial.BlendMode getDetailBlendMode()
getDetailUv
SpatialMaterial.DetailUV getDetailUv()
getDiffuseMode
SpatialMaterial.DiffuseMode getDiffuseMode()
getDistanceFade
SpatialMaterial.DistanceFadeMode getDistanceFade()
getDistanceFadeMaxDistance
double getDistanceFadeMaxDistance()
getDistanceFadeMinDistance
double getDistanceFadeMinDistance()
getEmission
Color getEmission()
getEmissionEnergy
double getEmissionEnergy()
getEmissionOperator
SpatialMaterial.EmissionOperator getEmissionOperator()
getFeature
bool getFeature(long feature)

Returns true, if the specified feature is enabled.

getFlag
bool getFlag(long flag)

Returns true, if the specified flag is enabled. See flags enumerator for options.

getGrow
double getGrow()
getLineWidth
double getLineWidth()
getMetallic
double getMetallic()
getMetallicTextureChannel
SpatialMaterial.TextureChannel getMetallicTextureChannel()
getNormalScale
double getNormalScale()
getParticlesAnimHFrames
long getParticlesAnimHFrames()
getParticlesAnimLoop
bool getParticlesAnimLoop()
getParticlesAnimVFrames
long getParticlesAnimVFrames()
getPointSize
double getPointSize()
getProximityFadeDistance
double getProximityFadeDistance()
getRefraction
double getRefraction()
getRefractionTextureChannel
SpatialMaterial.TextureChannel getRefractionTextureChannel()
getRim
double getRim()
getRimTint
double getRimTint()
getRoughness
double getRoughness()
getRoughnessTextureChannel
SpatialMaterial.TextureChannel getRoughnessTextureChannel()
getSpecular
double getSpecular()
getSpecularMode
SpatialMaterial.SpecularMode getSpecularMode()
getSubsurfaceScatteringStrength
double getSubsurfaceScatteringStrength()
getTexture
Ref!Texture getTexture(long param)

Returns the Texture associated with the specified textureparam.

getTransmission
Color getTransmission()
getUv1Offset
Vector3 getUv1Offset()
getUv1Scale
Vector3 getUv1Scale()
getUv1TriplanarBlendSharpness
double getUv1TriplanarBlendSharpness()
getUv2Offset
Vector3 getUv2Offset()
getUv2Scale
Vector3 getUv2Scale()
getUv2TriplanarBlendSharpness
double getUv2TriplanarBlendSharpness()
isDepthDeepParallaxEnabled
bool isDepthDeepParallaxEnabled()
isGrowEnabled
bool isGrowEnabled()
isProximityFadeEnabled
bool isProximityFadeEnabled()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(SpatialMaterial other)
opEquals
bool opEquals(typeof(null) n)
setAlbedo
void setAlbedo(Color albedo)
setAlphaScissorThreshold
void setAlphaScissorThreshold(double threshold)
setAnisotropy
void setAnisotropy(double anisotropy)
setAoLightAffect
void setAoLightAffect(double amount)
setAoTextureChannel
void setAoTextureChannel(long channel)
setBillboardMode
void setBillboardMode(long mode)
setBlendMode
void setBlendMode(long blend_mode)
setClearcoat
void setClearcoat(double clearcoat)
setClearcoatGloss
void setClearcoatGloss(double clearcoat_gloss)
setCullMode
void setCullMode(long cull_mode)
setDepthDeepParallax
void setDepthDeepParallax(bool enable)
setDepthDeepParallaxFlipBinormal
void setDepthDeepParallaxFlipBinormal(bool flip)
setDepthDeepParallaxFlipTangent
void setDepthDeepParallaxFlipTangent(bool flip)
setDepthDeepParallaxMaxLayers
void setDepthDeepParallaxMaxLayers(long layer)
setDepthDeepParallaxMinLayers
void setDepthDeepParallaxMinLayers(long layer)
setDepthDrawMode
void setDepthDrawMode(long depth_draw_mode)
setDepthScale
void setDepthScale(double depth_scale)
setDetailBlendMode
void setDetailBlendMode(long detail_blend_mode)
setDetailUv
void setDetailUv(long detail_uv)
setDiffuseMode
void setDiffuseMode(long diffuse_mode)
setDistanceFade
void setDistanceFade(long mode)
setDistanceFadeMaxDistance
void setDistanceFadeMaxDistance(double distance)
setDistanceFadeMinDistance
void setDistanceFadeMinDistance(double distance)
setEmission
void setEmission(Color emission)
setEmissionEnergy
void setEmissionEnergy(double emission_energy)
setEmissionOperator
void setEmissionOperator(long operator)
setFeature
void setFeature(long feature, bool enable)

If true, enables the specified feature. Many features that are available in SpatialMaterials need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to true.

setFlag
void setFlag(long flag, bool enable)

If true, enables the specified flag. Flags are optional behaviour that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to true. See flags enumerator for options.

setGrow
void setGrow(double amount)
setGrowEnabled
void setGrowEnabled(bool enable)
setLineWidth
void setLineWidth(double line_width)
setMetallic
void setMetallic(double metallic)
setMetallicTextureChannel
void setMetallicTextureChannel(long channel)
setNormalScale
void setNormalScale(double normal_scale)
setParticlesAnimHFrames
void setParticlesAnimHFrames(long frames)
setParticlesAnimLoop
void setParticlesAnimLoop(bool loop)
setParticlesAnimVFrames
void setParticlesAnimVFrames(long frames)
setPointSize
void setPointSize(double point_size)
setProximityFade
void setProximityFade(bool enabled)
setProximityFadeDistance
void setProximityFadeDistance(double distance)
setRefraction
void setRefraction(double refraction)
setRefractionTextureChannel
void setRefractionTextureChannel(long channel)
setRim
void setRim(double rim)
setRimTint
void setRimTint(double rim_tint)
setRoughness
void setRoughness(double roughness)
setRoughnessTextureChannel
void setRoughnessTextureChannel(long channel)
setSpecular
void setSpecular(double specular)
setSpecularMode
void setSpecularMode(long specular_mode)
setSubsurfaceScatteringStrength
void setSubsurfaceScatteringStrength(double strength)
setTexture
void setTexture(long param, Texture texture)

Sets the Texture to be used by the specified textureparam. This function is called when setting members ending in *_texture.

setTransmission
void setTransmission(Color transmission)
setUv1Offset
void setUv1Offset(Vector3 offset)
setUv1Scale
void setUv1Scale(Vector3 scale)
setUv1TriplanarBlendSharpness
void setUv1TriplanarBlendSharpness(double sharpness)
setUv2Offset
void setUv2Offset(Vector3 offset)
setUv2Scale
void setUv2Scale(Vector3 scale)
setUv2TriplanarBlendSharpness
void setUv2TriplanarBlendSharpness(double sharpness)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

albedoColor
Color albedoColor [@property getter]
Color albedoColor [@property setter]

The material's base color.

albedoTexture
Texture albedoTexture [@property getter]
Texture albedoTexture [@property setter]

Texture to multiply by albedoColor. Used for basic texturing of objects.

anisotropy
double anisotropy [@property getter]
double anisotropy [@property setter]

The strength of the anisotropy effect.

anisotropyEnabled
bool anisotropyEnabled [@property getter]
bool anisotropyEnabled [@property setter]

If true, anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken.

anisotropyFlowmap
Texture anisotropyFlowmap [@property getter]
Texture anisotropyFlowmap [@property setter]

Texture that offsets the tangent map for anisotropy calculations.

aoEnabled
bool aoEnabled [@property getter]
bool aoEnabled [@property setter]

If true, ambient occlusion is enabled. Ambient occlusion darkens areas based on the aoTexture.

aoLightAffect
double aoLightAffect [@property getter]
double aoLightAffect [@property setter]

Amount that ambient occlusion affects lighting from lights. If 0, ambient occlusion only affects ambient light. If 1, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic.

aoOnUv2
bool aoOnUv2 [@property getter]
bool aoOnUv2 [@property setter]

If true, use UV2 coordinates to look up from the aoTexture.

aoTexture
Texture aoTexture [@property getter]
Texture aoTexture [@property setter]

Texture that defines the amount of ambient occlusion for a given point on the object.

aoTextureChannel
long aoTextureChannel [@property setter]

Specifies the channel of the aoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

aoTextureChannel
SpatialMaterial.TextureChannel aoTextureChannel [@property getter]

Specifies the channel of the aoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

clearcoat
double clearcoat [@property getter]
double clearcoat [@property setter]

Sets the strength of the clearcoat effect. Setting to 0 looks the same as disabling the clearcoat effect.

clearcoatEnabled
bool clearcoatEnabled [@property getter]
bool clearcoatEnabled [@property setter]

If true, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. Note: Clearcoat rendering is not visible if the material has flagsUnshaded set to true.

clearcoatGloss
double clearcoatGloss [@property getter]
double clearcoatGloss [@property setter]

Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat.

clearcoatTexture
Texture clearcoatTexture [@property getter]
Texture clearcoatTexture [@property setter]

Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel.

depthDeepParallax
bool depthDeepParallax [@property setter]

If true, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping.

depthDeepParallax
bool depthDeepParallax [@property getter]

If true, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping.

depthEnabled
bool depthEnabled [@property getter]
bool depthEnabled [@property setter]

If true, depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also normalEnabled. Note: Depth mapping is not supported if triplanar mapping is used on the same material. The value of depthEnabled will be ignored if uv1Triplanar is enabled.

depthFlipBinormal
bool depthFlipBinormal [@property getter]
bool depthFlipBinormal [@property setter]

If true, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect.

depthFlipTangent
bool depthFlipTangent [@property getter]
bool depthFlipTangent [@property setter]

If true, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect.

depthMaxLayers
long depthMaxLayers [@property getter]
long depthMaxLayers [@property setter]

Number of layers to use when using depthDeepParallax and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.

depthMinLayers
long depthMinLayers [@property getter]
long depthMinLayers [@property setter]

Number of layers to use when using depthDeepParallax and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.

depthScale
double depthScale [@property getter]
double depthScale [@property setter]

Scales the depth offset effect. A higher number will create a larger depth.

depthTexture
Texture depthTexture [@property getter]
Texture depthTexture [@property setter]

Texture used to determine depth at a given pixel. Depth is always stored in the red channel.

detailAlbedo
Texture detailAlbedo [@property getter]
Texture detailAlbedo [@property setter]

Texture that specifies the color of the detail overlay.

detailBlendMode
SpatialMaterial.BlendMode detailBlendMode [@property getter]
long detailBlendMode [@property setter]

Specifies how the detailAlbedo should blend with the current ALBEDO. See blendmode for options.

detailEnabled
bool detailEnabled [@property getter]
bool detailEnabled [@property setter]

If true, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on detailMask. This can be used to add variation to objects, or to blend between two different albedo/normal textures.

detailMask
Texture detailMask [@property getter]
Texture detailMask [@property setter]

Texture used to specify how the detail textures get blended with the base textures.

detailNormal
Texture detailNormal [@property getter]
Texture detailNormal [@property setter]

Texture that specifies the per-pixel normal of the detail overlay. Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinatesthis page/url for a comparison of normal map coordinates expected by popular engines.

detailUvLayer
SpatialMaterial.DetailUV detailUvLayer [@property getter]
long detailUvLayer [@property setter]

Specifies whether to use UV or UV2 for the detail layer. See detailuv for options.

distanceFadeMaxDistance
double distanceFadeMaxDistance [@property getter]
double distanceFadeMaxDistance [@property setter]

Distance at which the object appears fully opaque. Note: If distance_fade_max_distance is less than distance_fade_min_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance.

distanceFadeMinDistance
double distanceFadeMinDistance [@property getter]
double distanceFadeMinDistance [@property setter]

Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. Note: If distance_fade_min_distance is greater than distance_fade_max_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance.

distanceFadeMode
SpatialMaterial.DistanceFadeMode distanceFadeMode [@property getter]
long distanceFadeMode [@property setter]

Specifies which type of fade to use. Can be any of the distancefademodes.

emission
Color emission [@property getter]
Color emission [@property setter]

The emitted light's color. See emissionEnabled.

emissionEnabled
bool emissionEnabled [@property getter]
bool emissionEnabled [@property setter]

If true, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a GIProbe or BakedLightmap is used and this object is used in baked lighting.

emissionEnergy
double emissionEnergy [@property getter]
double emissionEnergy [@property setter]

The emitted light's strength. See emissionEnabled.

emissionOnUv2
bool emissionOnUv2 [@property getter]
bool emissionOnUv2 [@property setter]

Use UV2 to read from the emissionTexture.

emissionOperator
SpatialMaterial.EmissionOperator emissionOperator [@property getter]
long emissionOperator [@property setter]

Sets how emission interacts with emissionTexture. Can either add or multiply. See emissionoperator for options.

emissionTexture
Texture emissionTexture [@property getter]
Texture emissionTexture [@property setter]

Texture that specifies how much surface emits light at a given point.

flagsAlbedoTexForceSrgb
bool flagsAlbedoTexForceSrgb [@property getter]
bool flagsAlbedoTexForceSrgb [@property setter]

Forces a conversion of the albedoTexture from sRGB space to linear space.

flagsDisableAmbientLight
bool flagsDisableAmbientLight [@property getter]
bool flagsDisableAmbientLight [@property setter]

If true, the object receives no ambient light.

flagsDoNotReceiveShadows
bool flagsDoNotReceiveShadows [@property getter]
bool flagsDoNotReceiveShadows [@property setter]

If true, the object receives no shadow that would otherwise be cast onto it.

flagsEnsureCorrectNormals
bool flagsEnsureCorrectNormals [@property getter]
bool flagsEnsureCorrectNormals [@property setter]

If true, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling.

flagsFixedSize
bool flagsFixedSize [@property getter]
bool flagsFixedSize [@property setter]

If true, the object is rendered at the same size regardless of distance.

flagsNoDepthTest
bool flagsNoDepthTest [@property getter]
bool flagsNoDepthTest [@property setter]

If true, depth testing is disabled and the object will be drawn in render order.

flagsTransparent
bool flagsTransparent [@property getter]
bool flagsTransparent [@property setter]

If true, transparency is enabled on the body. See also paramsBlendMode.

flagsUnshaded
bool flagsUnshaded [@property getter]
bool flagsUnshaded [@property setter]

If true, the object is unaffected by lighting.

flagsUsePointSize
bool flagsUsePointSize [@property getter]
bool flagsUsePointSize [@property setter]

If true, render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also paramsPointSize.

flagsUseShadowToOpacity
bool flagsUseShadowToOpacity [@property getter]
bool flagsUseShadowToOpacity [@property setter]

If true, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR.

flagsVertexLighting
bool flagsVertexLighting [@property getter]
bool flagsVertexLighting [@property setter]

If true, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices.

flagsWorldTriplanar
bool flagsWorldTriplanar [@property getter]
bool flagsWorldTriplanar [@property setter]

If true, triplanar mapping is calculated in world space rather than object local space. See also uv1Triplanar.

metallic
double metallic [@property getter]
double metallic [@property setter]

A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between 0 and 1 should only be used for blending between metal and non-metal sections. To alter the amount of reflection use roughness.

metallicSpecular
double metallicSpecular [@property getter]
double metallicSpecular [@property setter]

Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources. Note: unlike metallic, this is not energy-conserving, so it should be left at 0.5 in most cases. See also roughness.

metallicTexture
Texture metallicTexture [@property getter]
Texture metallicTexture [@property setter]

Texture used to specify metallic for an object. This is multiplied by metallic.

metallicTextureChannel
SpatialMaterial.TextureChannel metallicTextureChannel [@property getter]
long metallicTextureChannel [@property setter]

Specifies the channel of the metallicTexture in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

normalEnabled
bool normalEnabled [@property setter]

If true, normal mapping is enabled.

normalEnabled
bool normalEnabled [@property getter]

If true, normal mapping is enabled.

normalScale
double normalScale [@property setter]

The strength of the normal map's effect.

normalScale
double normalScale [@property getter]

The strength of the normal map's effect.

normalTexture
Texture normalTexture [@property getter]
Texture normalTexture [@property setter]

Texture used to specify the normal at a given pixel. The normal_texture only uses the red and green channels. The normal read from normal_texture is oriented around the surface normal provided by the Mesh. Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinatesthis page/url for a comparison of normal map coordinates expected by popular engines.

paramsAlphaScissorThreshold
double paramsAlphaScissorThreshold [@property getter]
double paramsAlphaScissorThreshold [@property setter]

Threshold at which the alpha scissor will discard values.

paramsBillboardKeepScale
bool paramsBillboardKeepScale [@property getter]
bool paramsBillboardKeepScale [@property setter]

If true, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when paramsBillboardMode is constant BILLBOARD_ENABLED.

paramsBillboardMode
SpatialMaterial.BillboardMode paramsBillboardMode [@property getter]
long paramsBillboardMode [@property setter]

Controls how the object faces the camera. See billboardmode. Note: Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See url=https://github.com/godotengine/godot/issues/41567GitHub issue #41567/url for details.

paramsBlendMode
SpatialMaterial.BlendMode paramsBlendMode [@property getter]
long paramsBlendMode [@property setter]

The material's blend mode. Note: Values other than Mix force the object into the transparent pipeline. See blendmode.

paramsCullMode
SpatialMaterial.CullMode paramsCullMode [@property getter]
long paramsCullMode [@property setter]

Which side of the object is not drawn when backfaces are rendered. See cullmode.

paramsDepthDrawMode
SpatialMaterial.DepthDrawMode paramsDepthDrawMode [@property getter]
long paramsDepthDrawMode [@property setter]

Determines when depth rendering takes place. See depthdrawmode. See also flagsTransparent.

paramsDiffuseMode
SpatialMaterial.DiffuseMode paramsDiffuseMode [@property getter]
long paramsDiffuseMode [@property setter]

The algorithm used for diffuse light scattering. See diffusemode.

paramsGrow
bool paramsGrow [@property getter]
bool paramsGrow [@property setter]

If true, enables the vertex grow setting. See paramsGrowAmount.

paramsGrowAmount
double paramsGrowAmount [@property getter]
double paramsGrowAmount [@property setter]

Grows object vertices in the direction of their normals.

paramsLineWidth
double paramsLineWidth [@property getter]
double paramsLineWidth [@property setter]

Currently unimplemented in Godot.

paramsPointSize
double paramsPointSize [@property getter]
double paramsPointSize [@property setter]

The point size in pixels. See flagsUsePointSize.

paramsSpecularMode
SpatialMaterial.SpecularMode paramsSpecularMode [@property getter]
long paramsSpecularMode [@property setter]

The method for rendering the specular blob. See specularmode.

paramsUseAlphaScissor
bool paramsUseAlphaScissor [@property getter]
bool paramsUseAlphaScissor [@property setter]

If true, the shader will discard all pixels that have an alpha value less than paramsAlphaScissorThreshold.

particlesAnimHFrames
long particlesAnimHFrames [@property getter]
long particlesAnimHFrames [@property setter]

The number of horizontal frames in the particle sprite sheet. Only enabled when using constant BILLBOARD_PARTICLES. See paramsBillboardMode.

particlesAnimLoop
bool particlesAnimLoop [@property getter]
bool particlesAnimLoop [@property setter]

If true, particle animations are looped. Only enabled when using constant BILLBOARD_PARTICLES. See paramsBillboardMode.

particlesAnimVFrames
long particlesAnimVFrames [@property getter]
long particlesAnimVFrames [@property setter]

The number of vertical frames in the particle sprite sheet. Only enabled when using constant BILLBOARD_PARTICLES. See paramsBillboardMode.

proximityFadeDistance
double proximityFadeDistance [@property getter]
double proximityFadeDistance [@property setter]

Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.

proximityFadeEnable
bool proximityFadeEnable [@property getter]
bool proximityFadeEnable [@property setter]

If true, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.

refractionEnabled
bool refractionEnabled [@property getter]
bool refractionEnabled [@property setter]

If true, the refraction effect is enabled. Distorts transparency based on light from behind the object.

refractionScale
double refractionScale [@property getter]
double refractionScale [@property setter]

The strength of the refraction effect.

refractionTexture
Texture refractionTexture [@property getter]
Texture refractionTexture [@property setter]

Texture that controls the strength of the refraction per-pixel. Multiplied by refractionScale.

refractionTextureChannel
SpatialMaterial.TextureChannel refractionTextureChannel [@property getter]
long refractionTextureChannel [@property setter]

Specifies the channel of the aoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

rim
double rim [@property getter]
double rim [@property setter]

Sets the strength of the rim lighting effect.

rimEnabled
bool rimEnabled [@property getter]
bool rimEnabled [@property setter]

If true, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. Note: Rim lighting is not visible if the material has flagsUnshaded set to true.

rimTexture
Texture rimTexture [@property getter]
Texture rimTexture [@property setter]

Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by rim.

rimTint
double rimTint [@property getter]
double rimTint [@property setter]

The amount of to blend light and albedo color when rendering rim effect. If 0 the light color is used, while 1 means albedo color is used. An intermediate value generally works best.

roughness
double roughness [@property getter]
double roughness [@property setter]

Surface reflection. A value of 0 represents a perfect mirror while a value of 1 completely blurs the reflection. See also metallic.

roughnessTexture
Texture roughnessTexture [@property getter]
Texture roughnessTexture [@property setter]

Texture used to control the roughness per-pixel. Multiplied by roughness.

roughnessTextureChannel
SpatialMaterial.TextureChannel roughnessTextureChannel [@property getter]
long roughnessTextureChannel [@property setter]

Specifies the channel of the aoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

subsurfScatterEnabled
bool subsurfScatterEnabled [@property getter]
bool subsurfScatterEnabled [@property setter]

If true, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.

subsurfScatterStrength
double subsurfScatterStrength [@property getter]
double subsurfScatterStrength [@property setter]

The strength of the subsurface scattering effect.

subsurfScatterTexture
Texture subsurfScatterTexture [@property getter]
Texture subsurfScatterTexture [@property setter]

Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by subsurfScatterStrength.

transmission
Color transmission [@property getter]
Color transmission [@property setter]

The color used by the transmission effect. Represents the light passing through an object.

transmissionEnabled
bool transmissionEnabled [@property getter]
bool transmissionEnabled [@property setter]

If true, the transmission effect is enabled.

transmissionTexture
Texture transmissionTexture [@property getter]
Texture transmissionTexture [@property setter]

Texture used to control the transmission effect per-pixel. Added to transmission.

uv1Offset
Vector3 uv1Offset [@property getter]
Vector3 uv1Offset [@property setter]

How much to offset the UV coordinates. This amount will be added to UV in the vertex function. This can be used to offset a texture.

uv1Scale
Vector3 uv1Scale [@property getter]
Vector3 uv1Scale [@property setter]

How much to scale the UV coordinates. This is multiplied by UV in the vertex function.

uv1Triplanar
bool uv1Triplanar [@property getter]
bool uv1Triplanar [@property setter]

If true, instead of using UV textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.

uv1TriplanarSharpness
double uv1TriplanarSharpness [@property getter]
double uv1TriplanarSharpness [@property setter]

A lower number blends the texture more softly while a higher number blends the texture more sharply.

uv2Offset
Vector3 uv2Offset [@property getter]
Vector3 uv2Offset [@property setter]

How much to offset the UV2 coordinates. This amount will be added to UV2 in the vertex function. This can be used to offset a texture.

uv2Scale
Vector3 uv2Scale [@property setter]

How much to scale the UV2 coordinates. This is multiplied by UV2 in the vertex function.

uv2Scale
Vector3 uv2Scale [@property getter]

How much to scale the UV2 coordinates. This is multiplied by UV2 in the vertex function.

uv2Triplanar
bool uv2Triplanar [@property getter]
bool uv2Triplanar [@property setter]

If true, instead of using UV2 textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.

uv2TriplanarSharpness
double uv2TriplanarSharpness [@property setter]

A lower number blends the texture more softly while a higher number blends the texture more sharply.

uv2TriplanarSharpness
double uv2TriplanarSharpness [@property getter]

A lower number blends the texture more softly while a higher number blends the texture more sharply.

vertexColorIsSrgb
bool vertexColorIsSrgb [@property getter]
bool vertexColorIsSrgb [@property setter]

If true, the model's vertex colors are processed as sRGB mode.

vertexColorUseAsAlbedo
bool vertexColorUseAsAlbedo [@property getter]
bool vertexColorUseAsAlbedo [@property setter]

If true, the vertex color is used as albedo color.

Static functions

_new
SpatialMaterial _new()

Construct a new instance of SpatialMaterial. Note: use memnew!SpatialMaterial instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta