[][src]Struct gdnative_bindings::SpatialMaterial

pub struct SpatialMaterial { /* fields omitted */ }

core class SpatialMaterial inherits Material (reference counted).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

Memory management

The lifetime of this object is automatically managed through reference counting.

Class hierarchy

SpatialMaterial inherits methods from:

Safety

All types in the Godot API have "interior mutability" in Rust parlance. To enforce that the official thread-safety guidelines are followed, the typestate pattern is used in the Ref and TRef smart pointers, and the Instance API. The typestate Access in these types tracks whether the access is unique, shared, or exclusive to the current thread. For more information, see the type-level documentation on Ref.

Implementations

impl SpatialMaterial[src]

Constants

pub const BILLBOARD_DISABLED: i64[src]

pub const BILLBOARD_ENABLED: i64[src]

pub const BILLBOARD_FIXED_Y: i64[src]

pub const BILLBOARD_PARTICLES: i64[src]

pub const BLEND_MODE_ADD: i64[src]

pub const BLEND_MODE_MIX: i64[src]

pub const BLEND_MODE_MUL: i64[src]

pub const BLEND_MODE_SUB: i64[src]

pub const CULL_BACK: i64[src]

pub const CULL_DISABLED: i64[src]

pub const CULL_FRONT: i64[src]

pub const DEPTH_DRAW_ALPHA_OPAQUE_PREPASS: i64[src]

pub const DEPTH_DRAW_ALWAYS: i64[src]

pub const DEPTH_DRAW_DISABLED: i64[src]

pub const DEPTH_DRAW_OPAQUE_ONLY: i64[src]

pub const DETAIL_UV_1: i64[src]

pub const DETAIL_UV_2: i64[src]

pub const DIFFUSE_BURLEY: i64[src]

pub const DIFFUSE_LAMBERT: i64[src]

pub const DIFFUSE_LAMBERT_WRAP: i64[src]

pub const DIFFUSE_OREN_NAYAR: i64[src]

pub const DIFFUSE_TOON: i64[src]

pub const DISTANCE_FADE_DISABLED: i64[src]

pub const DISTANCE_FADE_OBJECT_DITHER: i64[src]

pub const DISTANCE_FADE_PIXEL_ALPHA: i64[src]

pub const DISTANCE_FADE_PIXEL_DITHER: i64[src]

pub const EMISSION_OP_ADD: i64[src]

pub const EMISSION_OP_MULTIPLY: i64[src]

pub const FEATURE_AMBIENT_OCCLUSION: i64[src]

pub const FEATURE_ANISOTROPY: i64[src]

pub const FEATURE_CLEARCOAT: i64[src]

pub const FEATURE_DEPTH_MAPPING: i64[src]

pub const FEATURE_DETAIL: i64[src]

pub const FEATURE_EMISSION: i64[src]

pub const FEATURE_MAX: i64[src]

pub const FEATURE_NORMAL_MAPPING: i64[src]

pub const FEATURE_REFRACTION: i64[src]

pub const FEATURE_RIM: i64[src]

pub const FEATURE_SUBSURACE_SCATTERING: i64[src]

pub const FEATURE_TRANSMISSION: i64[src]

pub const FEATURE_TRANSPARENT: i64[src]

pub const FLAG_ALBEDO_FROM_VERTEX_COLOR: i64[src]

pub const FLAG_ALBEDO_TEXTURE_FORCE_SRGB: i64[src]

pub const FLAG_AO_ON_UV2: i64[src]

pub const FLAG_BILLBOARD_KEEP_SCALE: i64[src]

pub const FLAG_DISABLE_AMBIENT_LIGHT: i64[src]

pub const FLAG_DISABLE_DEPTH_TEST: i64[src]

pub const FLAG_DONT_RECEIVE_SHADOWS: i64[src]

pub const FLAG_EMISSION_ON_UV2: i64[src]

pub const FLAG_ENSURE_CORRECT_NORMALS: i64[src]

pub const FLAG_FIXED_SIZE: i64[src]

pub const FLAG_MAX: i64[src]

pub const FLAG_SRGB_VERTEX_COLOR: i64[src]

pub const FLAG_TRIPLANAR_USE_WORLD: i64[src]

pub const FLAG_UNSHADED: i64[src]

pub const FLAG_USE_ALPHA_SCISSOR: i64[src]

pub const FLAG_USE_POINT_SIZE: i64[src]

pub const FLAG_USE_SHADOW_TO_OPACITY: i64[src]

pub const FLAG_USE_VERTEX_LIGHTING: i64[src]

pub const FLAG_UV1_USE_TRIPLANAR: i64[src]

pub const FLAG_UV2_USE_TRIPLANAR: i64[src]

pub const SPECULAR_BLINN: i64[src]

pub const SPECULAR_DISABLED: i64[src]

pub const SPECULAR_PHONG: i64[src]

pub const SPECULAR_SCHLICK_GGX: i64[src]

pub const SPECULAR_TOON: i64[src]

pub const TEXTURE_ALBEDO: i64[src]

pub const TEXTURE_AMBIENT_OCCLUSION: i64[src]

pub const TEXTURE_CHANNEL_ALPHA: i64[src]

pub const TEXTURE_CHANNEL_BLUE: i64[src]

pub const TEXTURE_CHANNEL_GRAYSCALE: i64[src]

pub const TEXTURE_CHANNEL_GREEN: i64[src]

pub const TEXTURE_CHANNEL_RED: i64[src]

pub const TEXTURE_CLEARCOAT: i64[src]

pub const TEXTURE_DEPTH: i64[src]

pub const TEXTURE_DETAIL_ALBEDO: i64[src]

pub const TEXTURE_DETAIL_MASK: i64[src]

pub const TEXTURE_DETAIL_NORMAL: i64[src]

pub const TEXTURE_EMISSION: i64[src]

pub const TEXTURE_FLOWMAP: i64[src]

pub const TEXTURE_MAX: i64[src]

pub const TEXTURE_METALLIC: i64[src]

pub const TEXTURE_NORMAL: i64[src]

pub const TEXTURE_REFRACTION: i64[src]

pub const TEXTURE_RIM: i64[src]

pub const TEXTURE_ROUGHNESS: i64[src]

pub const TEXTURE_SUBSURFACE_SCATTERING: i64[src]

pub const TEXTURE_TRANSMISSION: i64[src]

impl SpatialMaterial[src]

pub fn new() -> Ref<Self, Unique>[src]

Creates a new instance of this object.

This is a reference-counted type. The returned object is automatically managed by Ref.

pub fn albedo(&self) -> Color[src]

The material's base color.

pub fn alpha_scissor_threshold(&self) -> f64[src]

Threshold at which the alpha scissor will discard values.

pub fn anisotropy(&self) -> f64[src]

The strength of the anisotropy effect.

pub fn ao_light_affect(&self) -> f64[src]

Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], 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.

pub fn ao_texture_channel(&self) -> TextureChannel[src]

Specifies the channel of the [member ao_texture] 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.

pub fn billboard_mode(&self) -> BillboardMode[src]

Controls how the object faces the camera. See [enum BillboardMode].

pub fn blend_mode(&self) -> BlendMode[src]

The material's blend mode.
			[b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode].

pub fn clearcoat(&self) -> f64[src]

Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect.

pub fn clearcoat_gloss(&self) -> f64[src]

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

pub fn cull_mode(&self) -> CullMode[src]

Which side of the object is not drawn when backfaces are rendered. See [enum CullMode].

pub fn depth_deep_parallax_flip_binormal(&self) -> bool[src]

If [code]true[/code], 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.

pub fn depth_deep_parallax_flip_tangent(&self) -> bool[src]

If [code]true[/code], 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.

pub fn depth_deep_parallax_max_layers(&self) -> i64[src]

Number of layers to use when using [member depth_deep_parallax] 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.

pub fn depth_deep_parallax_min_layers(&self) -> i64[src]

Number of layers to use when using [member depth_deep_parallax] 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.

pub fn depth_draw_mode(&self) -> DepthDrawMode[src]

Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member flags_transparent].

pub fn depth_scale(&self) -> f64[src]

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

pub fn detail_blend_mode(&self) -> BlendMode[src]

Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options.

pub fn detail_uv(&self) -> DetailUv[src]

Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.

pub fn diffuse_mode(&self) -> DiffuseMode[src]

The algorithm used for diffuse light scattering. See [enum DiffuseMode].

pub fn distance_fade(&self) -> DistanceFadeMode[src]

Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.

pub fn distance_fade_max_distance(&self) -> f64[src]

Distance at which the object fades fully and is no longer visible.

pub fn distance_fade_min_distance(&self) -> f64[src]

Distance at which the object starts to fade. If the object is less than this distance away it will appear normal.

pub fn emission(&self) -> Color[src]

The emitted light's color. See [member emission_enabled].

pub fn emission_energy(&self) -> f64[src]

The emitted light's strength. See [member emission_enabled].

pub fn emission_operator(&self) -> EmissionOperator[src]

Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options.

pub fn feature(&self, feature: i64) -> bool[src]

If [code]true[/code], the transmission effect is enabled.

pub fn flag(&self, flag: i64) -> bool[src]

If [code]true[/code], the vertex color is used as albedo color.

pub fn grow(&self) -> f64[src]

Grows object vertices in the direction of their normals.

pub fn line_width(&self) -> f64[src]

Currently unimplemented in Godot.

pub fn metallic(&self) -> f64[src]

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 [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness].

pub fn metallic_texture_channel(&self) -> TextureChannel[src]

Specifies the channel of the [member metallic_texture] 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.

pub fn normal_scale(&self) -> f64[src]

The strength of the normal map's effect.

pub fn particles_anim_h_frames(&self) -> i64[src]

The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].

pub fn particles_anim_loop(&self) -> bool[src]

If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].

pub fn particles_anim_v_frames(&self) -> i64[src]

The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].

pub fn point_size(&self) -> f64[src]

The point size in pixels. See [member flags_use_point_size].

pub fn proximity_fade_distance(&self) -> f64[src]

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

pub fn refraction(&self) -> f64[src]

The strength of the refraction effect.

pub fn refraction_texture_channel(&self) -> TextureChannel[src]

Specifies the channel of the [member ao_texture] 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.

pub fn rim(&self) -> f64[src]

Sets the strength of the rim lighting effect.

pub fn rim_tint(&self) -> f64[src]

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

pub fn roughness(&self) -> f64[src]

Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic].

pub fn roughness_texture_channel(&self) -> TextureChannel[src]

Specifies the channel of the [member ao_texture] 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.

pub fn specular(&self) -> f64[src]

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

pub fn specular_mode(&self) -> SpecularMode[src]

The method for rendering the specular blob. See [enum SpecularMode].

pub fn subsurface_scattering_strength(&self) -> f64[src]

The strength of the subsurface scattering effect.

pub fn texture(&self, param: i64) -> Option<Ref<Texture, Shared>>[src]

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

pub fn transmission(&self) -> Color[src]

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

pub fn uv1_offset(&self) -> Vector3[src]

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

pub fn uv1_scale(&self) -> Vector3[src]

How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function.

pub fn uv1_triplanar_blend_sharpness(&self) -> f64[src]

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

pub fn uv2_offset(&self) -> Vector3[src]

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

pub fn uv2_scale(&self) -> Vector3[src]

How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function.

pub fn uv2_triplanar_blend_sharpness(&self) -> f64[src]

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

pub fn is_depth_deep_parallax_enabled(&self) -> bool[src]

If [code]true[/code], 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.

pub fn is_grow_enabled(&self) -> bool[src]

If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount].

pub fn is_proximity_fade_enabled(&self) -> bool[src]

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

pub fn set_albedo(&self, albedo: Color)[src]

The material's base color.

pub fn set_alpha_scissor_threshold(&self, threshold: f64)[src]

Threshold at which the alpha scissor will discard values.

pub fn set_anisotropy(&self, anisotropy: f64)[src]

The strength of the anisotropy effect.

pub fn set_ao_light_affect(&self, amount: f64)[src]

Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], 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.

pub fn set_ao_texture_channel(&self, channel: i64)[src]

Specifies the channel of the [member ao_texture] 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.

pub fn set_billboard_mode(&self, mode: i64)[src]

Controls how the object faces the camera. See [enum BillboardMode].

pub fn set_blend_mode(&self, blend_mode: i64)[src]

The material's blend mode.
			[b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode].

pub fn set_clearcoat(&self, clearcoat: f64)[src]

Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect.

pub fn set_clearcoat_gloss(&self, clearcoat_gloss: f64)[src]

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

pub fn set_cull_mode(&self, cull_mode: i64)[src]

Which side of the object is not drawn when backfaces are rendered. See [enum CullMode].

pub fn set_depth_deep_parallax(&self, enable: bool)[src]

If [code]true[/code], 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.

pub fn set_depth_deep_parallax_flip_binormal(&self, flip: bool)[src]

If [code]true[/code], 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.

pub fn set_depth_deep_parallax_flip_tangent(&self, flip: bool)[src]

If [code]true[/code], 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.

pub fn set_depth_deep_parallax_max_layers(&self, layer: i64)[src]

Number of layers to use when using [member depth_deep_parallax] 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.

pub fn set_depth_deep_parallax_min_layers(&self, layer: i64)[src]

Number of layers to use when using [member depth_deep_parallax] 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.

pub fn set_depth_draw_mode(&self, depth_draw_mode: i64)[src]

Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member flags_transparent].

pub fn set_depth_scale(&self, depth_scale: f64)[src]

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

pub fn set_detail_blend_mode(&self, detail_blend_mode: i64)[src]

Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options.

pub fn set_detail_uv(&self, detail_uv: i64)[src]

Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options.

pub fn set_diffuse_mode(&self, diffuse_mode: i64)[src]

The algorithm used for diffuse light scattering. See [enum DiffuseMode].

pub fn set_distance_fade(&self, mode: i64)[src]

Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.

pub fn set_distance_fade_max_distance(&self, distance: f64)[src]

Distance at which the object fades fully and is no longer visible.

pub fn set_distance_fade_min_distance(&self, distance: f64)[src]

Distance at which the object starts to fade. If the object is less than this distance away it will appear normal.

pub fn set_emission(&self, emission: Color)[src]

The emitted light's color. See [member emission_enabled].

pub fn set_emission_energy(&self, emission_energy: f64)[src]

The emitted light's strength. See [member emission_enabled].

pub fn set_emission_operator(&self, operator: i64)[src]

Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options.

pub fn set_feature(&self, feature: i64, enable: bool)[src]

If [code]true[/code], the transmission effect is enabled.

pub fn set_flag(&self, flag: i64, enable: bool)[src]

If [code]true[/code], the vertex color is used as albedo color.

pub fn set_grow(&self, amount: f64)[src]

Grows object vertices in the direction of their normals.

pub fn set_grow_enabled(&self, enable: bool)[src]

If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount].

pub fn set_line_width(&self, line_width: f64)[src]

Currently unimplemented in Godot.

pub fn set_metallic(&self, metallic: f64)[src]

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 [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness].

pub fn set_metallic_texture_channel(&self, channel: i64)[src]

Specifies the channel of the [member metallic_texture] 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.

pub fn set_normal_scale(&self, normal_scale: f64)[src]

The strength of the normal map's effect.

pub fn set_particles_anim_h_frames(&self, frames: i64)[src]

The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].

pub fn set_particles_anim_loop(&self, _loop: bool)[src]

If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].

pub fn set_particles_anim_v_frames(&self, frames: i64)[src]

The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode].

pub fn set_point_size(&self, point_size: f64)[src]

The point size in pixels. See [member flags_use_point_size].

pub fn set_proximity_fade(&self, enabled: bool)[src]

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

pub fn set_proximity_fade_distance(&self, distance: f64)[src]

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

pub fn set_refraction(&self, refraction: f64)[src]

The strength of the refraction effect.

pub fn set_refraction_texture_channel(&self, channel: i64)[src]

Specifies the channel of the [member ao_texture] 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.

pub fn set_rim(&self, rim: f64)[src]

Sets the strength of the rim lighting effect.

pub fn set_rim_tint(&self, rim_tint: f64)[src]

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

pub fn set_roughness(&self, roughness: f64)[src]

Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic].

pub fn set_roughness_texture_channel(&self, channel: i64)[src]

Specifies the channel of the [member ao_texture] 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.

pub fn set_specular(&self, specular: f64)[src]

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

pub fn set_specular_mode(&self, specular_mode: i64)[src]

The method for rendering the specular blob. See [enum SpecularMode].

pub fn set_subsurface_scattering_strength(&self, strength: f64)[src]

The strength of the subsurface scattering effect.

pub fn set_texture(&self, param: i64, texture: impl AsArg<Texture>)[src]

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

pub fn set_transmission(&self, transmission: Color)[src]

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

pub fn set_uv1_offset(&self, offset: Vector3)[src]

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

pub fn set_uv1_scale(&self, scale: Vector3)[src]

How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function.

pub fn set_uv1_triplanar_blend_sharpness(&self, sharpness: f64)[src]

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

pub fn set_uv2_offset(&self, offset: Vector3)[src]

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

pub fn set_uv2_scale(&self, scale: Vector3)[src]

How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function.

pub fn set_uv2_triplanar_blend_sharpness(&self, sharpness: f64)[src]

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

Methods from Deref<Target = Material>

pub fn next_pass(&self) -> Option<Ref<Material, Shared>>[src]

Sets the [Material] to be used for the next pass. This renders the object again using a different material.
			[b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial".

pub fn render_priority(&self) -> i64[src]

Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
			[b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).

pub fn set_next_pass(&self, next_pass: impl AsArg<Material>)[src]

Sets the [Material] to be used for the next pass. This renders the object again using a different material.
			[b]Note:[/b] only applies to [SpatialMaterial]s and [ShaderMaterial]s with type "Spatial".

pub fn set_render_priority(&self, priority: i64)[src]

Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.
			[b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).

Trait Implementations

impl Debug for SpatialMaterial[src]

impl Deref for SpatialMaterial[src]

type Target = Material

The resulting type after dereferencing.

impl DerefMut for SpatialMaterial[src]

impl GodotObject for SpatialMaterial[src]

type RefKind = RefCounted

The memory management kind of this type. This modifies the behavior of the Ref smart pointer. See its type-level documentation for more information. Read more

impl Instanciable for SpatialMaterial[src]

impl Sealed for SpatialMaterial[src]

impl SubClass<Material> for SpatialMaterial[src]

impl SubClass<Object> for SpatialMaterial[src]

impl SubClass<Reference> for SpatialMaterial[src]

impl SubClass<Resource> for SpatialMaterial[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.