Documentation
¶
Overview ¶
This class serves as 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.
Index ¶
- type Advanced
- type AlphaAntiAliasing
- type Any
- type BillboardMode
- type BlendMode
- type CullMode
- type DepthDrawMode
- type DepthTest
- type DetailUV
- type DiffuseMode
- type DistanceFadeMode
- type EmissionOperator
- type Extension
- type Feature
- type Flags
- type ID
- type Instance
- func (self Instance) AlbedoColor() Color.RGBA
- func (self Instance) AlbedoTexture() Texture2D.Instance
- func (self Instance) AlbedoTextureForceSrgb() bool
- func (self Instance) AlbedoTextureMsdf() bool
- func (self Instance) AlphaAntialiasingEdge() Float.X
- func (self Instance) AlphaAntialiasingMode() AlphaAntiAliasing
- func (self Instance) AlphaHashScale() Float.X
- func (self Instance) AlphaScissorThreshold() Float.X
- func (self Instance) Anisotropy() Float.X
- func (self Instance) AnisotropyEnabled() bool
- func (self Instance) AnisotropyFlowmap() Texture2D.Instance
- func (self Instance) AoEnabled() bool
- func (self Instance) AoLightAffect() Float.X
- func (self Instance) AoOnUv2() bool
- func (self Instance) AoTexture() Texture2D.Instance
- func (self Instance) AoTextureChannel() TextureChannel
- func (self Instance) AsBaseMaterial3D() Instance
- func (self Instance) AsMaterial() Material.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) Backlight() Color.RGBA
- func (self Instance) BacklightEnabled() bool
- func (self Instance) BacklightTexture() Texture2D.Instance
- func (self Instance) BentNormalEnabled() bool
- func (self Instance) BentNormalTexture() Texture2D.Instance
- func (self Instance) BillboardKeepScale() bool
- func (self Instance) BillboardMode() BillboardMode
- func (self Instance) BlendMode() BlendMode
- func (self Instance) Clearcoat() Float.X
- func (self Instance) ClearcoatEnabled() bool
- func (self Instance) ClearcoatRoughness() Float.X
- func (self Instance) ClearcoatTexture() Texture2D.Instance
- func (self Instance) CullMode() CullMode
- func (self Instance) DepthDrawMode() DepthDrawMode
- func (self Instance) DepthTest() DepthTest
- func (self Instance) DetailAlbedo() Texture2D.Instance
- func (self Instance) DetailBlendMode() BlendMode
- func (self Instance) DetailEnabled() bool
- func (self Instance) DetailMask() Texture2D.Instance
- func (self Instance) DetailNormal() Texture2D.Instance
- func (self Instance) DetailUvLayer() DetailUV
- func (self Instance) DiffuseMode() DiffuseMode
- func (self Instance) DisableAmbientLight() bool
- func (self Instance) DisableFog() bool
- func (self Instance) DisableReceiveShadows() bool
- func (self Instance) DisableSpecularOcclusion() bool
- func (self Instance) DistanceFadeMaxDistance() Float.X
- func (self Instance) DistanceFadeMinDistance() Float.X
- func (self Instance) DistanceFadeMode() DistanceFadeMode
- func (self Instance) Emission() Color.RGBA
- func (self Instance) EmissionEnabled() bool
- func (self Instance) EmissionEnergyMultiplier() Float.X
- func (self Instance) EmissionIntensity() Float.X
- func (self Instance) EmissionOnUv2() bool
- func (self Instance) EmissionOperator() EmissionOperator
- func (self Instance) EmissionTexture() Texture2D.Instance
- func (self Instance) FixedSize() bool
- func (self Instance) FovOverride() Float.X
- func (self Instance) Grow() bool
- func (self Instance) GrowAmount() Float.X
- func (self Instance) HeightmapDeepParallax() bool
- func (self Instance) HeightmapEnabled() bool
- func (self Instance) HeightmapFlipBinormal() bool
- func (self Instance) HeightmapFlipTangent() bool
- func (self Instance) HeightmapFlipTexture() bool
- func (self Instance) HeightmapMaxLayers() int
- func (self Instance) HeightmapMinLayers() int
- func (self Instance) HeightmapScale() Float.X
- func (self Instance) HeightmapTexture() Texture2D.Instance
- func (self Instance) ID() ID
- func (self Instance) Metallic() Float.X
- func (self Instance) MetallicSpecular() Float.X
- func (self Instance) MetallicTexture() Texture2D.Instance
- func (self Instance) MetallicTextureChannel() TextureChannel
- func (self Instance) MsdfOutlineSize() Float.X
- func (self Instance) MsdfPixelRange() Float.X
- func (self Instance) NoDepthTest() bool
- func (self Instance) NormalEnabled() bool
- func (self Instance) NormalScale() Float.X
- func (self Instance) NormalTexture() Texture2D.Instance
- func (self Instance) OrmTexture() Texture2D.Instance
- func (self Instance) ParticlesAnimHFrames() int
- func (self Instance) ParticlesAnimLoop() bool
- func (self Instance) ParticlesAnimVFrames() int
- func (self Instance) PointSize() Float.X
- func (self Instance) ProximityFadeDistance() Float.X
- func (self Instance) ProximityFadeEnabled() bool
- func (self Instance) RefractionEnabled() bool
- func (self Instance) RefractionScale() Float.X
- func (self Instance) RefractionTexture() Texture2D.Instance
- func (self Instance) RefractionTextureChannel() TextureChannel
- func (self Instance) Rim() Float.X
- func (self Instance) RimEnabled() bool
- func (self Instance) RimTexture() Texture2D.Instance
- func (self Instance) RimTint() Float.X
- func (self Instance) Roughness() Float.X
- func (self Instance) RoughnessTexture() Texture2D.Instance
- func (self Instance) RoughnessTextureChannel() TextureChannel
- func (self Instance) SetAlbedoColor(value Color.RGBA)
- func (self Instance) SetAlbedoTexture(value Texture2D.Instance)
- func (self Instance) SetAlbedoTextureForceSrgb(value bool)
- func (self Instance) SetAlbedoTextureMsdf(value bool)
- func (self Instance) SetAlphaAntialiasingEdge(value Float.X)
- func (self Instance) SetAlphaAntialiasingMode(value AlphaAntiAliasing)
- func (self Instance) SetAlphaHashScale(value Float.X)
- func (self Instance) SetAlphaScissorThreshold(value Float.X)
- func (self Instance) SetAnisotropy(value Float.X)
- func (self Instance) SetAnisotropyEnabled(value bool)
- func (self Instance) SetAnisotropyFlowmap(value Texture2D.Instance)
- func (self Instance) SetAoEnabled(value bool)
- func (self Instance) SetAoLightAffect(value Float.X)
- func (self Instance) SetAoOnUv2(value bool)
- func (self Instance) SetAoTexture(value Texture2D.Instance)
- func (self Instance) SetAoTextureChannel(value TextureChannel)
- func (self Instance) SetBacklight(value Color.RGBA)
- func (self Instance) SetBacklightEnabled(value bool)
- func (self Instance) SetBacklightTexture(value Texture2D.Instance)
- func (self Instance) SetBentNormalEnabled(value bool)
- func (self Instance) SetBentNormalTexture(value Texture2D.Instance)
- func (self Instance) SetBillboardKeepScale(value bool)
- func (self Instance) SetBillboardMode(value BillboardMode)
- func (self Instance) SetBlendMode(value BlendMode)
- func (self Instance) SetClearcoat(value Float.X)
- func (self Instance) SetClearcoatEnabled(value bool)
- func (self Instance) SetClearcoatRoughness(value Float.X)
- func (self Instance) SetClearcoatTexture(value Texture2D.Instance)
- func (self Instance) SetCullMode(value CullMode)
- func (self Instance) SetDepthDrawMode(value DepthDrawMode)
- func (self Instance) SetDepthTest(value DepthTest)
- func (self Instance) SetDetailAlbedo(value Texture2D.Instance)
- func (self Instance) SetDetailBlendMode(value BlendMode)
- func (self Instance) SetDetailEnabled(value bool)
- func (self Instance) SetDetailMask(value Texture2D.Instance)
- func (self Instance) SetDetailNormal(value Texture2D.Instance)
- func (self Instance) SetDetailUvLayer(value DetailUV)
- func (self Instance) SetDiffuseMode(value DiffuseMode)
- func (self Instance) SetDisableAmbientLight(value bool)
- func (self Instance) SetDisableFog(value bool)
- func (self Instance) SetDisableReceiveShadows(value bool)
- func (self Instance) SetDisableSpecularOcclusion(value bool)
- func (self Instance) SetDistanceFadeMaxDistance(value Float.X)
- func (self Instance) SetDistanceFadeMinDistance(value Float.X)
- func (self Instance) SetDistanceFadeMode(value DistanceFadeMode)
- func (self Instance) SetEmission(value Color.RGBA)
- func (self Instance) SetEmissionEnabled(value bool)
- func (self Instance) SetEmissionEnergyMultiplier(value Float.X)
- func (self Instance) SetEmissionIntensity(value Float.X)
- func (self Instance) SetEmissionOnUv2(value bool)
- func (self Instance) SetEmissionOperator(value EmissionOperator)
- func (self Instance) SetEmissionTexture(value Texture2D.Instance)
- func (self Instance) SetFixedSize(value bool)
- func (self Instance) SetFovOverride(value Float.X)
- func (self Instance) SetGrow(value bool)
- func (self Instance) SetGrowAmount(value Float.X)
- func (self Instance) SetHeightmapDeepParallax(value bool)
- func (self Instance) SetHeightmapEnabled(value bool)
- func (self Instance) SetHeightmapFlipBinormal(value bool)
- func (self Instance) SetHeightmapFlipTangent(value bool)
- func (self Instance) SetHeightmapFlipTexture(value bool)
- func (self Instance) SetHeightmapMaxLayers(value int)
- func (self Instance) SetHeightmapMinLayers(value int)
- func (self Instance) SetHeightmapScale(value Float.X)
- func (self Instance) SetHeightmapTexture(value Texture2D.Instance)
- func (self Instance) SetMetallic(value Float.X)
- func (self Instance) SetMetallicSpecular(value Float.X)
- func (self Instance) SetMetallicTexture(value Texture2D.Instance)
- func (self Instance) SetMetallicTextureChannel(value TextureChannel)
- func (self Instance) SetMsdfOutlineSize(value Float.X)
- func (self Instance) SetMsdfPixelRange(value Float.X)
- func (self Instance) SetNoDepthTest(value bool)
- func (self Instance) SetNormalEnabled(value bool)
- func (self Instance) SetNormalScale(value Float.X)
- func (self Instance) SetNormalTexture(value Texture2D.Instance)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOrmTexture(value Texture2D.Instance)
- func (self Instance) SetParticlesAnimHFrames(value int)
- func (self Instance) SetParticlesAnimLoop(value bool)
- func (self Instance) SetParticlesAnimVFrames(value int)
- func (self Instance) SetPointSize(value Float.X)
- func (self Instance) SetProximityFadeDistance(value Float.X)
- func (self Instance) SetProximityFadeEnabled(value bool)
- func (self Instance) SetRefractionEnabled(value bool)
- func (self Instance) SetRefractionScale(value Float.X)
- func (self Instance) SetRefractionTexture(value Texture2D.Instance)
- func (self Instance) SetRefractionTextureChannel(value TextureChannel)
- func (self Instance) SetRim(value Float.X)
- func (self Instance) SetRimEnabled(value bool)
- func (self Instance) SetRimTexture(value Texture2D.Instance)
- func (self Instance) SetRimTint(value Float.X)
- func (self Instance) SetRoughness(value Float.X)
- func (self Instance) SetRoughnessTexture(value Texture2D.Instance)
- func (self Instance) SetRoughnessTextureChannel(value TextureChannel)
- func (self Instance) SetShadingMode(value ShadingMode)
- func (self Instance) SetShadowToOpacity(value bool)
- func (self Instance) SetSpecularMode(value SpecularMode)
- func (self Instance) SetStencilColor(value Color.RGBA)
- func (self Instance) SetStencilCompare(value StencilCompare)
- func (self Instance) SetStencilFlags(value int)
- func (self Instance) SetStencilMode(value StencilMode)
- func (self Instance) SetStencilOutlineThickness(value Float.X)
- func (self Instance) SetStencilReference(value int)
- func (self Instance) SetSubsurfScatterEnabled(value bool)
- func (self Instance) SetSubsurfScatterSkinMode(value bool)
- func (self Instance) SetSubsurfScatterStrength(value Float.X)
- func (self Instance) SetSubsurfScatterTexture(value Texture2D.Instance)
- func (self Instance) SetSubsurfScatterTransmittanceBoost(value Float.X)
- func (self Instance) SetSubsurfScatterTransmittanceColor(value Color.RGBA)
- func (self Instance) SetSubsurfScatterTransmittanceDepth(value Float.X)
- func (self Instance) SetSubsurfScatterTransmittanceEnabled(value bool)
- func (self Instance) SetSubsurfScatterTransmittanceTexture(value Texture2D.Instance)
- func (self Instance) SetTextureFilter(value TextureFilter)
- func (self Instance) SetTextureRepeat(value bool)
- func (self Instance) SetTransparency(value Transparency)
- func (self Instance) SetUseFovOverride(value bool)
- func (self Instance) SetUseParticleTrails(value bool)
- func (self Instance) SetUsePointSize(value bool)
- func (self Instance) SetUseZClipScale(value bool)
- func (self Instance) SetUv1Offset(value Vector3.XYZ)
- func (self Instance) SetUv1Scale(value Vector3.XYZ)
- func (self Instance) SetUv1Triplanar(value bool)
- func (self Instance) SetUv1TriplanarSharpness(value Float.X)
- func (self Instance) SetUv1WorldTriplanar(value bool)
- func (self Instance) SetUv2Offset(value Vector3.XYZ)
- func (self Instance) SetUv2Scale(value Vector3.XYZ)
- func (self Instance) SetUv2Triplanar(value bool)
- func (self Instance) SetUv2TriplanarSharpness(value Float.X)
- func (self Instance) SetUv2WorldTriplanar(value bool)
- func (self Instance) SetVertexColorIsSrgb(value bool)
- func (self Instance) SetVertexColorUseAsAlbedo(value bool)
- func (self Instance) SetZClipScale(value Float.X)
- func (self Instance) ShadingMode() ShadingMode
- func (self Instance) ShadowToOpacity() bool
- func (self Instance) SpecularMode() SpecularMode
- func (self Instance) StencilColor() Color.RGBA
- func (self Instance) StencilCompare() StencilCompare
- func (self Instance) StencilFlags() int
- func (self Instance) StencilMode() StencilMode
- func (self Instance) StencilOutlineThickness() Float.X
- func (self Instance) StencilReference() int
- func (self Instance) SubsurfScatterEnabled() bool
- func (self Instance) SubsurfScatterSkinMode() bool
- func (self Instance) SubsurfScatterStrength() Float.X
- func (self Instance) SubsurfScatterTexture() Texture2D.Instance
- func (self Instance) SubsurfScatterTransmittanceBoost() Float.X
- func (self Instance) SubsurfScatterTransmittanceColor() Color.RGBA
- func (self Instance) SubsurfScatterTransmittanceDepth() Float.X
- func (self Instance) SubsurfScatterTransmittanceEnabled() bool
- func (self Instance) SubsurfScatterTransmittanceTexture() Texture2D.Instance
- func (self Instance) TextureFilter() TextureFilter
- func (self Instance) TextureRepeat() bool
- func (self Instance) Transparency() Transparency
- func (self Instance) UseFovOverride() bool
- func (self Instance) UseParticleTrails() bool
- func (self Instance) UsePointSize() bool
- func (self Instance) UseZClipScale() bool
- func (self Instance) Uv1Offset() Vector3.XYZ
- func (self Instance) Uv1Scale() Vector3.XYZ
- func (self Instance) Uv1Triplanar() bool
- func (self Instance) Uv1TriplanarSharpness() Float.X
- func (self Instance) Uv1WorldTriplanar() bool
- func (self Instance) Uv2Offset() Vector3.XYZ
- func (self Instance) Uv2Scale() Vector3.XYZ
- func (self Instance) Uv2Triplanar() bool
- func (self Instance) Uv2TriplanarSharpness() Float.X
- func (self Instance) Uv2WorldTriplanar() bool
- func (self Instance) VertexColorIsSrgb() bool
- func (self Instance) VertexColorUseAsAlbedo() bool
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) ZClipScale() Float.X
- type ShadingMode
- type SpecularMode
- type StencilCompare
- type StencilFlags
- type StencilMode
- type TextureChannel
- type TextureFilter
- type TextureParam
- type Transparency
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 AlphaAntiAliasing ¶
type AlphaAntiAliasing int //gd:BaseMaterial3D.AlphaAntiAliasing
const ( // Disables Alpha AntiAliasing for the material. AlphaAntialiasingOff AlphaAntiAliasing = 0 // Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask. AlphaAntialiasingAlphaToCoverage AlphaAntiAliasing = 1 // Enables AlphaToCoverage and forces all non-zero alpha values to 1. Alpha values in the material are passed to the AntiAliasing sample mask. AlphaAntialiasingAlphaToCoverageAndToOne AlphaAntiAliasing = 2 )
type BillboardMode ¶
type BillboardMode int //gd:BaseMaterial3D.BillboardMode
const ( // Billboard mode is disabled. BillboardDisabled BillboardMode = 0 // The object's Z axis will always face the camera. BillboardEnabled BillboardMode = 1 // The object's X axis will always face the camera. BillboardFixedY BillboardMode = 2 // Used for particle systems when assigned to [graphics.gd/classdb/GPUParticles3D] and [graphics.gd/classdb/CPUParticles3D] nodes (flipbook animation). Enables particles_anim_* properties. // // The [graphics.gd/classdb/ParticleProcessMaterial.Instance.AnimSpeedMin] or [graphics.gd/classdb/CPUParticles3D.Instance.AnimSpeedMin] should also be set to a value bigger than zero for the animation to play. BillboardParticles BillboardMode = 3 )
type BlendMode ¶
type BlendMode int //gd:BaseMaterial3D.BlendMode
const ( // Default blend mode. The color of the object is blended over the background based on the object's alpha value. BlendModeMix BlendMode = 0 // The color of the object is added to the background. BlendModeAdd BlendMode = 1 // The color of the object is subtracted from the background. BlendModeSub BlendMode = 2 // The color of the object is multiplied by the background. BlendModeMul BlendMode = 3 // The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the PREMUL_ALPHA_FACTOR built-in so that lighting can be modulated as well. BlendModePremultAlpha BlendMode = 4 )
type CullMode ¶
type CullMode int //gd:BaseMaterial3D.CullMode
const ( // Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible. CullBack CullMode = 0 // Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes, this means that the interior of the mesh will be drawn instead of the exterior. CullFront CullMode = 1 // No face culling is performed; both the front face and back face will be visible. CullDisabled CullMode = 2 )
type DepthDrawMode ¶
type DepthDrawMode int //gd:BaseMaterial3D.DepthDrawMode
const ( // Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass. DepthDrawOpaqueOnly DepthDrawMode = 0 // Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. // // Note: This does not influence whether transparent objects are included in the depth prepass or not. For that, see [Transparency]. DepthDrawAlways DepthDrawMode = 1 // Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). DepthDrawDisabled DepthDrawMode = 2 )
type DiffuseMode ¶
type DiffuseMode int //gd:BaseMaterial3D.DiffuseMode
const ( // Default diffuse scattering algorithm. DiffuseBurley DiffuseMode = 0 // Diffuse scattering ignores roughness. DiffuseLambert DiffuseMode = 1 // Extends Lambert to cover more than 90 degrees when roughness increases. DiffuseLambertWrap DiffuseMode = 2 // Uses a hard cut for lighting, with smoothing affected by roughness. DiffuseToon DiffuseMode = 3 )
type DistanceFadeMode ¶
type DistanceFadeMode int //gd:BaseMaterial3D.DistanceFadeMode
const ( // Do not use distance fade. DistanceFadeDisabled DistanceFadeMode = 0 // Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. DistanceFadePixelAlpha DistanceFadeMode = 1 // Smoothly fades the object out based on each pixel's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [DistanceFadePixelAlpha]. DistanceFadePixelDither DistanceFadeMode = 2 // Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [DistanceFadePixelAlpha] and [DistanceFadePixelDither]. DistanceFadeObjectDither DistanceFadeMode = 3 )
type EmissionOperator ¶
type EmissionOperator int //gd:BaseMaterial3D.EmissionOperator
const ( // Adds the emission color to the color from the emission texture. EmissionOpAdd EmissionOperator = 0 // Multiplies the emission color by the color from the emission texture. EmissionOpMultiply EmissionOperator = 1 )
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsBaseMaterial3D ¶
func (*Extension[T]) AsMaterial ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type Feature ¶
type Feature int //gd:BaseMaterial3D.Feature
const ( // Constant for setting [Instance.EmissionEnabled]. FeatureEmission Feature = 0 // Constant for setting [Instance.NormalEnabled]. FeatureNormalMapping Feature = 1 // Constant for setting [Instance.RimEnabled]. FeatureRim Feature = 2 // Constant for setting [Instance.ClearcoatEnabled]. FeatureClearcoat Feature = 3 // Constant for setting [Instance.AnisotropyEnabled]. FeatureAnisotropy Feature = 4 // Constant for setting [Instance.AoEnabled]. FeatureAmbientOcclusion Feature = 5 // Constant for setting [Instance.HeightmapEnabled]. FeatureHeightMapping Feature = 6 // Constant for setting [Instance.SubsurfScatterEnabled]. FeatureSubsurfaceScattering Feature = 7 // Constant for setting [Instance.SubsurfScatterTransmittanceEnabled]. FeatureSubsurfaceTransmittance Feature = 8 // Constant for setting [Instance.BacklightEnabled]. FeatureBacklight Feature = 9 // Constant for setting [Instance.RefractionEnabled]. FeatureRefraction Feature = 10 // Constant for setting [Instance.DetailEnabled]. FeatureDetail Feature = 11 // Constant for setting [Instance.BentNormalEnabled]. FeatureBentNormalMapping Feature = 12 // Represents the size of the [Feature] enum. FeatureMax Feature = 13 )
type Flags ¶
type Flags int //gd:BaseMaterial3D.Flags
const ( // Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth. FlagDisableDepthTest Flags = 0 // Set ALBEDO to the per-vertex color specified in the mesh. FlagAlbedoFromVertexColor Flags = 1 // Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also [Instance.VertexColorIsSrgb]. // // Note: Only effective when using the Forward+ and Mobile rendering methods. FlagSrgbVertexColor Flags = 2 // Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use POINT_COORD instead of UV. FlagUsePointSize Flags = 3 // Object is scaled by depth so that it always appears the same size on screen. FlagFixedSize Flags = 4 // Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [Instance.BillboardMode] is [BillboardEnabled]. FlagBillboardKeepScale Flags = 5 // Use triplanar texture lookup for all texture lookups that would normally use UV. FlagUv1UseTriplanar Flags = 6 // Use triplanar texture lookup for all texture lookups that would normally use UV2. FlagUv2UseTriplanar Flags = 7 // Use triplanar texture lookup for all texture lookups that would normally use UV. FlagUv1UseWorldTriplanar Flags = 8 // Use triplanar texture lookup for all texture lookups that would normally use UV2. FlagUv2UseWorldTriplanar Flags = 9 // Use UV2 coordinates to look up from the [Instance.AoTexture]. FlagAoOnUv2 Flags = 10 // Use UV2 coordinates to look up from the [Instance.EmissionTexture]. FlagEmissionOnUv2 Flags = 11 // Forces the shader to convert albedo from sRGB space to linear space. See also [Instance.AlbedoTextureForceSrgb]. FlagAlbedoTextureForceSrgb Flags = 12 // Disables receiving shadows from other objects. FlagDontReceiveShadows Flags = 13 // Disables receiving ambient light. FlagDisableAmbientLight Flags = 14 // Enables the shadow to opacity feature. FlagUseShadowToOpacity Flags = 15 // Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. FlagUseTextureRepeat Flags = 16 // Invert values read from a depth texture to convert them to height values (heightmap). FlagInvertHeightmap Flags = 17 // Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. FlagSubsurfaceModeSkin Flags = 18 // Enables parts of the shader required for [graphics.gd/classdb/GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [graphics.gd/classdb/RibbonTrailMesh] or [graphics.gd/classdb/TubeTrailMesh]. Enabling this feature outside of materials used in [graphics.gd/classdb/GPUParticles3D] meshes will break material rendering. FlagParticleTrailsMode Flags = 19 // Enables multichannel signed distance field rendering shader. FlagAlbedoTextureMsdf Flags = 20 // Disables receiving depth-based or volumetric fog. FlagDisableFog Flags = 21 // Disables specular occlusion. FlagDisableSpecularOcclusion Flags = 22 // Enables using [Instance.ZClipScale]. FlagUseZClipScale Flags = 23 // Enables using [Instance.FovOverride]. FlagUseFovOverride Flags = 24 // Represents the size of the [Flags] enum. FlagMax Flags = 25 )
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.BaseMaterial3D
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AlbedoColor ¶
func (Instance) AlbedoTexture ¶
func (Instance) AlbedoTextureForceSrgb ¶
func (Instance) AlbedoTextureMsdf ¶
func (Instance) AlphaAntialiasingEdge ¶
func (Instance) AlphaAntialiasingMode ¶
func (self Instance) AlphaAntialiasingMode() AlphaAntiAliasing
func (Instance) AlphaHashScale ¶
func (Instance) AlphaScissorThreshold ¶
func (Instance) Anisotropy ¶
func (Instance) AnisotropyEnabled ¶
func (Instance) AnisotropyFlowmap ¶
func (Instance) AoLightAffect ¶
func (Instance) AoTextureChannel ¶
func (self Instance) AoTextureChannel() TextureChannel
func (Instance) AsBaseMaterial3D ¶
func (Instance) AsMaterial ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) BacklightEnabled ¶
func (Instance) BacklightTexture ¶
func (Instance) BentNormalEnabled ¶
func (Instance) BentNormalTexture ¶
func (Instance) BillboardKeepScale ¶
func (Instance) BillboardMode ¶
func (self Instance) BillboardMode() BillboardMode
func (Instance) ClearcoatEnabled ¶
func (Instance) ClearcoatRoughness ¶
func (Instance) ClearcoatTexture ¶
func (Instance) DepthDrawMode ¶
func (self Instance) DepthDrawMode() DepthDrawMode
func (Instance) DetailAlbedo ¶
func (Instance) DetailBlendMode ¶
func (Instance) DetailEnabled ¶
func (Instance) DetailMask ¶
func (Instance) DetailNormal ¶
func (Instance) DetailUvLayer ¶
func (Instance) DiffuseMode ¶
func (self Instance) DiffuseMode() DiffuseMode
func (Instance) DisableAmbientLight ¶
func (Instance) DisableFog ¶
func (Instance) DisableReceiveShadows ¶
func (Instance) DisableSpecularOcclusion ¶
func (Instance) DistanceFadeMaxDistance ¶
func (Instance) DistanceFadeMinDistance ¶
func (Instance) DistanceFadeMode ¶
func (self Instance) DistanceFadeMode() DistanceFadeMode
func (Instance) EmissionEnabled ¶
func (Instance) EmissionEnergyMultiplier ¶
func (Instance) EmissionIntensity ¶
func (Instance) EmissionOnUv2 ¶
func (Instance) EmissionOperator ¶
func (self Instance) EmissionOperator() EmissionOperator
func (Instance) EmissionTexture ¶
func (Instance) FovOverride ¶
func (Instance) GrowAmount ¶
func (Instance) HeightmapDeepParallax ¶
func (Instance) HeightmapEnabled ¶
func (Instance) HeightmapFlipBinormal ¶
func (Instance) HeightmapFlipTangent ¶
func (Instance) HeightmapFlipTexture ¶
func (Instance) HeightmapMaxLayers ¶
func (Instance) HeightmapMinLayers ¶
func (Instance) HeightmapScale ¶
func (Instance) HeightmapTexture ¶
func (Instance) MetallicSpecular ¶
func (Instance) MetallicTexture ¶
func (Instance) MetallicTextureChannel ¶
func (self Instance) MetallicTextureChannel() TextureChannel
func (Instance) MsdfOutlineSize ¶
func (Instance) MsdfPixelRange ¶
func (Instance) NoDepthTest ¶
func (Instance) NormalEnabled ¶
func (Instance) NormalScale ¶
func (Instance) NormalTexture ¶
func (Instance) OrmTexture ¶
func (Instance) ParticlesAnimHFrames ¶
func (Instance) ParticlesAnimLoop ¶
func (Instance) ParticlesAnimVFrames ¶
func (Instance) ProximityFadeDistance ¶
func (Instance) ProximityFadeEnabled ¶
func (Instance) RefractionEnabled ¶
func (Instance) RefractionScale ¶
func (Instance) RefractionTexture ¶
func (Instance) RefractionTextureChannel ¶
func (self Instance) RefractionTextureChannel() TextureChannel
func (Instance) RimEnabled ¶
func (Instance) RimTexture ¶
func (Instance) RoughnessTexture ¶
func (Instance) RoughnessTextureChannel ¶
func (self Instance) RoughnessTextureChannel() TextureChannel
func (Instance) SetAlbedoColor ¶
func (Instance) SetAlbedoTexture ¶
func (Instance) SetAlbedoTextureForceSrgb ¶
func (Instance) SetAlbedoTextureMsdf ¶
func (Instance) SetAlphaAntialiasingEdge ¶
func (Instance) SetAlphaAntialiasingMode ¶
func (self Instance) SetAlphaAntialiasingMode(value AlphaAntiAliasing)
func (Instance) SetAlphaHashScale ¶
func (Instance) SetAlphaScissorThreshold ¶
func (Instance) SetAnisotropy ¶
func (Instance) SetAnisotropyEnabled ¶
func (Instance) SetAnisotropyFlowmap ¶
func (Instance) SetAoEnabled ¶
func (Instance) SetAoLightAffect ¶
func (Instance) SetAoOnUv2 ¶
func (Instance) SetAoTexture ¶
func (Instance) SetAoTextureChannel ¶
func (self Instance) SetAoTextureChannel(value TextureChannel)
func (Instance) SetBacklight ¶
func (Instance) SetBacklightEnabled ¶
func (Instance) SetBacklightTexture ¶
func (Instance) SetBentNormalEnabled ¶
func (Instance) SetBentNormalTexture ¶
func (Instance) SetBillboardKeepScale ¶
func (Instance) SetBillboardMode ¶
func (self Instance) SetBillboardMode(value BillboardMode)
func (Instance) SetBlendMode ¶
func (Instance) SetClearcoat ¶
func (Instance) SetClearcoatEnabled ¶
func (Instance) SetClearcoatRoughness ¶
func (Instance) SetClearcoatTexture ¶
func (Instance) SetCullMode ¶
func (Instance) SetDepthDrawMode ¶
func (self Instance) SetDepthDrawMode(value DepthDrawMode)
func (Instance) SetDepthTest ¶
func (Instance) SetDetailAlbedo ¶
func (Instance) SetDetailBlendMode ¶
func (Instance) SetDetailEnabled ¶
func (Instance) SetDetailMask ¶
func (Instance) SetDetailNormal ¶
func (Instance) SetDetailUvLayer ¶
func (Instance) SetDiffuseMode ¶
func (self Instance) SetDiffuseMode(value DiffuseMode)
func (Instance) SetDisableAmbientLight ¶
func (Instance) SetDisableFog ¶
func (Instance) SetDisableReceiveShadows ¶
func (Instance) SetDisableSpecularOcclusion ¶
func (Instance) SetDistanceFadeMaxDistance ¶
func (Instance) SetDistanceFadeMinDistance ¶
func (Instance) SetDistanceFadeMode ¶
func (self Instance) SetDistanceFadeMode(value DistanceFadeMode)
func (Instance) SetEmission ¶
func (Instance) SetEmissionEnabled ¶
func (Instance) SetEmissionEnergyMultiplier ¶
func (Instance) SetEmissionIntensity ¶
func (Instance) SetEmissionOnUv2 ¶
func (Instance) SetEmissionOperator ¶
func (self Instance) SetEmissionOperator(value EmissionOperator)
func (Instance) SetEmissionTexture ¶
func (Instance) SetFixedSize ¶
func (Instance) SetFovOverride ¶
func (Instance) SetGrowAmount ¶
func (Instance) SetHeightmapDeepParallax ¶
func (Instance) SetHeightmapEnabled ¶
func (Instance) SetHeightmapFlipBinormal ¶
func (Instance) SetHeightmapFlipTangent ¶
func (Instance) SetHeightmapFlipTexture ¶
func (Instance) SetHeightmapMaxLayers ¶
func (Instance) SetHeightmapMinLayers ¶
func (Instance) SetHeightmapScale ¶
func (Instance) SetHeightmapTexture ¶
func (Instance) SetMetallic ¶
func (Instance) SetMetallicSpecular ¶
func (Instance) SetMetallicTexture ¶
func (Instance) SetMetallicTextureChannel ¶
func (self Instance) SetMetallicTextureChannel(value TextureChannel)
func (Instance) SetMsdfOutlineSize ¶
func (Instance) SetMsdfPixelRange ¶
func (Instance) SetNoDepthTest ¶
func (Instance) SetNormalEnabled ¶
func (Instance) SetNormalScale ¶
func (Instance) SetNormalTexture ¶
func (Instance) SetOrmTexture ¶
func (Instance) SetParticlesAnimHFrames ¶
func (Instance) SetParticlesAnimLoop ¶
func (Instance) SetParticlesAnimVFrames ¶
func (Instance) SetPointSize ¶
func (Instance) SetProximityFadeDistance ¶
func (Instance) SetProximityFadeEnabled ¶
func (Instance) SetRefractionEnabled ¶
func (Instance) SetRefractionScale ¶
func (Instance) SetRefractionTexture ¶
func (Instance) SetRefractionTextureChannel ¶
func (self Instance) SetRefractionTextureChannel(value TextureChannel)
func (Instance) SetRimEnabled ¶
func (Instance) SetRimTexture ¶
func (Instance) SetRimTint ¶
func (Instance) SetRoughness ¶
func (Instance) SetRoughnessTexture ¶
func (Instance) SetRoughnessTextureChannel ¶
func (self Instance) SetRoughnessTextureChannel(value TextureChannel)
func (Instance) SetShadingMode ¶
func (self Instance) SetShadingMode(value ShadingMode)
func (Instance) SetShadowToOpacity ¶
func (Instance) SetSpecularMode ¶
func (self Instance) SetSpecularMode(value SpecularMode)
func (Instance) SetStencilColor ¶
func (Instance) SetStencilCompare ¶
func (self Instance) SetStencilCompare(value StencilCompare)
func (Instance) SetStencilFlags ¶
func (Instance) SetStencilMode ¶
func (self Instance) SetStencilMode(value StencilMode)
func (Instance) SetStencilOutlineThickness ¶
func (Instance) SetStencilReference ¶
func (Instance) SetSubsurfScatterEnabled ¶
func (Instance) SetSubsurfScatterSkinMode ¶
func (Instance) SetSubsurfScatterStrength ¶
func (Instance) SetSubsurfScatterTexture ¶
func (Instance) SetSubsurfScatterTransmittanceBoost ¶
func (Instance) SetSubsurfScatterTransmittanceColor ¶
func (Instance) SetSubsurfScatterTransmittanceDepth ¶
func (Instance) SetSubsurfScatterTransmittanceEnabled ¶
func (Instance) SetSubsurfScatterTransmittanceTexture ¶
func (Instance) SetTextureFilter ¶
func (self Instance) SetTextureFilter(value TextureFilter)
func (Instance) SetTextureRepeat ¶
func (Instance) SetTransparency ¶
func (self Instance) SetTransparency(value Transparency)
func (Instance) SetUseFovOverride ¶
func (Instance) SetUseParticleTrails ¶
func (Instance) SetUsePointSize ¶
func (Instance) SetUseZClipScale ¶
func (Instance) SetUv1Offset ¶
func (Instance) SetUv1Scale ¶
func (Instance) SetUv1Triplanar ¶
func (Instance) SetUv1TriplanarSharpness ¶
func (Instance) SetUv1WorldTriplanar ¶
func (Instance) SetUv2Offset ¶
func (Instance) SetUv2Scale ¶
func (Instance) SetUv2Triplanar ¶
func (Instance) SetUv2TriplanarSharpness ¶
func (Instance) SetUv2WorldTriplanar ¶
func (Instance) SetVertexColorIsSrgb ¶
func (Instance) SetVertexColorUseAsAlbedo ¶
func (Instance) SetZClipScale ¶
func (Instance) ShadingMode ¶
func (self Instance) ShadingMode() ShadingMode
func (Instance) ShadowToOpacity ¶
func (Instance) SpecularMode ¶
func (self Instance) SpecularMode() SpecularMode
func (Instance) StencilColor ¶
func (Instance) StencilCompare ¶
func (self Instance) StencilCompare() StencilCompare
func (Instance) StencilFlags ¶
func (Instance) StencilMode ¶
func (self Instance) StencilMode() StencilMode
func (Instance) StencilOutlineThickness ¶
func (Instance) StencilReference ¶
func (Instance) SubsurfScatterEnabled ¶
func (Instance) SubsurfScatterSkinMode ¶
func (Instance) SubsurfScatterStrength ¶
func (Instance) SubsurfScatterTexture ¶
func (Instance) SubsurfScatterTransmittanceBoost ¶
func (Instance) SubsurfScatterTransmittanceColor ¶
func (Instance) SubsurfScatterTransmittanceDepth ¶
func (Instance) SubsurfScatterTransmittanceEnabled ¶
func (Instance) SubsurfScatterTransmittanceTexture ¶
func (Instance) TextureFilter ¶
func (self Instance) TextureFilter() TextureFilter
func (Instance) TextureRepeat ¶
func (Instance) Transparency ¶
func (self Instance) Transparency() Transparency
func (Instance) UseFovOverride ¶
func (Instance) UseParticleTrails ¶
func (Instance) UsePointSize ¶
func (Instance) UseZClipScale ¶
func (Instance) Uv1Triplanar ¶
func (Instance) Uv1TriplanarSharpness ¶
func (Instance) Uv1WorldTriplanar ¶
func (Instance) Uv2Triplanar ¶
func (Instance) Uv2TriplanarSharpness ¶
func (Instance) Uv2WorldTriplanar ¶
func (Instance) VertexColorIsSrgb ¶
func (Instance) VertexColorUseAsAlbedo ¶
func (Instance) ZClipScale ¶
type ShadingMode ¶
type ShadingMode int //gd:BaseMaterial3D.ShadingMode
const ( // The object will not receive shadows. This is the fastest to render, but it disables all interactions with lights. ShadingModeUnshaded ShadingMode = 0 // The object will be shaded per pixel. Useful for realistic shading effects. ShadingModePerPixel ShadingMode = 1 // The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. ShadingModePerVertex ShadingMode = 2 // Represents the size of the [ShadingMode] enum. ShadingModeMax ShadingMode = 3 )
type SpecularMode ¶
type SpecularMode int //gd:BaseMaterial3D.SpecularMode
const ( // Default specular blob. // // Note: Forward+ uses multiscattering for more accurate reflections, although the impact of multiscattering is more noticeable on rough metallic surfaces than on smooth, non-metallic surfaces. // // Note: Mobile and Compatibility don't perform multiscattering for performance reasons. Instead, they perform single scattering, which means rough metallic surfaces may look slightly darker than intended. SpecularSchlickGgx SpecularMode = 0 // Toon blob which changes size based on roughness. SpecularToon SpecularMode = 1 // No specular blob. This is slightly faster to render than other specular modes. SpecularDisabled SpecularMode = 2 )
type StencilCompare ¶
type StencilCompare int //gd:BaseMaterial3D.StencilCompare
const ( // Always passes the stencil test. StencilCompareAlways StencilCompare = 0 // Passes the stencil test when the reference value is less than the existing stencil value. StencilCompareLess StencilCompare = 1 // Passes the stencil test when the reference value is equal to the existing stencil value. StencilCompareEqual StencilCompare = 2 // Passes the stencil test when the reference value is less than or equal to the existing stencil value. StencilCompareLessOrEqual StencilCompare = 3 // Passes the stencil test when the reference value is greater than the existing stencil value. StencilCompareGreater StencilCompare = 4 // Passes the stencil test when the reference value is not equal to the existing stencil value. StencilCompareNotEqual StencilCompare = 5 // Passes the stencil test when the reference value is greater than or equal to the existing stencil value. StencilCompareGreaterOrEqual StencilCompare = 6 )
type StencilFlags ¶
type StencilFlags int //gd:BaseMaterial3D.StencilFlags
const ( // The material will only be rendered where it passes a stencil comparison with existing stencil buffer values. See [StencilCompare]. StencilFlagRead StencilFlags = 1 // The material will write the reference value to the stencil buffer where it passes the depth test. StencilFlagWrite StencilFlags = 2 // The material will write the reference value to the stencil buffer where it fails the depth test. StencilFlagWriteDepthFail StencilFlags = 4 )
type StencilMode ¶
type StencilMode int //gd:BaseMaterial3D.StencilMode
const ( // Disables stencil operations. StencilModeDisabled StencilMode = 0 // Stencil preset which applies an outline to the object. // // Note: Requires a [graphics.gd/classdb/Material.Instance.NextPass] material which will be automatically applied. Any manual changes made to [graphics.gd/classdb/Material.Instance.NextPass] will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a [graphics.gd/classdb/Material.Instance.NextPass] material on a material that uses stencil presets, use [graphics.gd/classdb/GeometryInstance3D.Instance.MaterialOverlay] instead. StencilModeOutline StencilMode = 1 // Stencil preset which shows a silhouette of the object behind walls. // // Note: Requires a [graphics.gd/classdb/Material.Instance.NextPass] material which will be automatically applied. Any manual changes made to [graphics.gd/classdb/Material.Instance.NextPass] will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a [graphics.gd/classdb/Material.Instance.NextPass] material on a material that uses stencil presets, use [graphics.gd/classdb/GeometryInstance3D.Instance.MaterialOverlay] instead. StencilModeXray StencilMode = 2 // Enables stencil operations without a preset. StencilModeCustom StencilMode = 3 )
type TextureChannel ¶
type TextureChannel int //gd:BaseMaterial3D.TextureChannel
const ( // Used to read from the red channel of a texture. TextureChannelRed TextureChannel = 0 // Used to read from the green channel of a texture. TextureChannelGreen TextureChannel = 1 // Used to read from the blue channel of a texture. TextureChannelBlue TextureChannel = 2 // Used to read from the alpha channel of a texture. TextureChannelAlpha TextureChannel = 3 // Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. TextureChannelGrayscale TextureChannel = 4 )
type TextureFilter ¶
type TextureFilter int //gd:BaseMaterial3D.TextureFilter
const ( // The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). TextureFilterNearest TextureFilter = 0 // The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). TextureFilterLinear TextureFilter = 1 // The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [graphics.gd/classdb/ProjectSettings] "rendering/textures/default_filters/use_nearest_mipmap_filter" is true). This makes the texture look pixelated from up close, and smooth from a distance. TextureFilterNearestWithMipmaps TextureFilter = 2 // The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [graphics.gd/classdb/ProjectSettings] "rendering/textures/default_filters/use_nearest_mipmap_filter" is true). This makes the texture look smooth from up close, and smooth from a distance. TextureFilterLinearWithMipmaps TextureFilter = 3 // The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [graphics.gd/classdb/ProjectSettings] "rendering/textures/default_filters/use_nearest_mipmap_filter" is true) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [graphics.gd/classdb/ProjectSettings] "rendering/textures/default_filters/anisotropic_filtering_level". TextureFilterNearestWithMipmapsAnisotropic TextureFilter = 4 // The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [graphics.gd/classdb/ProjectSettings] "rendering/textures/default_filters/use_nearest_mipmap_filter" is true) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [graphics.gd/classdb/ProjectSettings] "rendering/textures/default_filters/anisotropic_filtering_level". TextureFilterLinearWithMipmapsAnisotropic TextureFilter = 5 // Represents the size of the [TextureFilter] enum. TextureFilterMax TextureFilter = 6 )
type TextureParam ¶
type TextureParam int //gd:BaseMaterial3D.TextureParam
const ( // Texture specifying per-pixel color. TextureAlbedo TextureParam = 0 // Texture specifying per-pixel metallic value. TextureMetallic TextureParam = 1 // Texture specifying per-pixel roughness value. TextureRoughness TextureParam = 2 // Texture specifying per-pixel emission color. TextureEmission TextureParam = 3 // Texture specifying per-pixel normal vector. TextureNormal TextureParam = 4 // Texture specifying per-pixel bent normal vector. TextureBentNormal TextureParam = 18 // Texture specifying per-pixel rim value. TextureRim TextureParam = 5 // Texture specifying per-pixel clearcoat value. TextureClearcoat TextureParam = 6 // Texture specifying per-pixel flowmap direction for use with [Instance.Anisotropy]. TextureFlowmap TextureParam = 7 // Texture specifying per-pixel ambient occlusion value. TextureAmbientOcclusion TextureParam = 8 // Texture specifying per-pixel height. TextureHeightmap TextureParam = 9 // Texture specifying per-pixel subsurface scattering. TextureSubsurfaceScattering TextureParam = 10 // Texture specifying per-pixel transmittance for subsurface scattering. TextureSubsurfaceTransmittance TextureParam = 11 // Texture specifying per-pixel backlight color. TextureBacklight TextureParam = 12 // Texture specifying per-pixel refraction strength. TextureRefraction TextureParam = 13 // Texture specifying per-pixel detail mask blending value. TextureDetailMask TextureParam = 14 // Texture specifying per-pixel detail color. TextureDetailAlbedo TextureParam = 15 // Texture specifying per-pixel detail normal. TextureDetailNormal TextureParam = 16 // Texture holding ambient occlusion, roughness, and metallic. TextureOrm TextureParam = 17 // Represents the size of the [TextureParam] enum. TextureMax TextureParam = 19 )
type Transparency ¶
type Transparency int //gd:BaseMaterial3D.Transparency
const ( // The material will not use transparency. This is the fastest to render. TransparencyDisabled Transparency = 0 // The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting. TransparencyAlpha Transparency = 1 // The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. TransparencyAlphaScissor Transparency = 2 // The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. Alpha hashing is suited for hair rendering. TransparencyAlphaHash Transparency = 3 // The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. This also supports casting shadows. TransparencyAlphaDepthPrePass Transparency = 4 // Represents the size of the [Transparency] enum. TransparencyMax Transparency = 5 )