Open Asterune
MaterialVariant

MaterialVariant

Overrides the surface shading of a base material.

Creatable
Instance.new("MaterialVariant")
Inherits
Instance
Replication
Standard

Behavior

MaterialVariant overrides the surface shading of a base material.

Summary

Members29
Properties26
Methods3

Properties

Anisotropy

MaterialVariant.Anisotropy: number = 0

The strength of direction-dependent specular reflection.

AnisotropyDirection

MaterialVariant.AnisotropyDirection: number = 0

The orientation of anisotropic surface reflections.

BaseMaterial

MaterialVariant.BaseMaterial: Enum.Material = Enum.Material.Plastic

The engine material overridden by this MaterialVariant.

Clearcoat

MaterialVariant.Clearcoat: number = 0

The strength of the additional clearcoat reflection layer.

ClearcoatRoughness

MaterialVariant.ClearcoatRoughness: number = 0.05

The roughness of the clearcoat reflection layer.

EmissiveColor

MaterialVariant.EmissiveColor: Color3 = Color3.new(1, 1, 1)

The color emitted by the surface.

EmissiveStrength

MaterialVariant.EmissiveStrength: number = 0

The intensity multiplier for surface emission.

IOR

MaterialVariant.IOR: number = 1.5

The surface's index of refraction.

MaterialSet

MaterialVariant.MaterialSet: string = ""

The material-set identifier used when resolving material appearance.

Metalness

MaterialVariant.Metalness: number = -1

The metallic contribution of the surface shading model.

ParallaxDepth

MaterialVariant.ParallaxDepth: number = 0

The apparent depth used for parallax mapping.

Roughness

MaterialVariant.Roughness: number = -1

The roughness of the surface's specular reflection.

Shader

MaterialVariant.Shader: SurfaceShader? = nil

The SurfaceShader used to shade this material.

ShaderParameters

MaterialVariant.ShaderParameters: string = "[]"

Serialized values for the shader's parameter slots.

Sheen

MaterialVariant.Sheen: number = 0

The contribution of the surface's sheen layer.

SheenColor

MaterialVariant.SheenColor: Color3 = Color3.new(1, 1, 1)

The tint of the sheen reflection.

SheenRoughness

MaterialVariant.SheenRoughness: number = 0.5

The roughness of the sheen reflection.

SpecularTint

MaterialVariant.SpecularTint: Color3 = Color3.new(1, 1, 1)

The tint applied to specular reflection.

StudsPerTile

MaterialVariant.StudsPerTile: number = 0

The world-space size of one texture repetition, in studs.

Subsurface

MaterialVariant.Subsurface: number = 0

The contribution of subsurface scattering.

SubsurfaceColor

MaterialVariant.SubsurfaceColor: Color3 = Color3.new(1, 0.35, 0.25)

The tint of subsurface-scattered light.

SurfaceShader

MaterialVariant.SurfaceShader: string = ""

The source text of the custom surface shader.

SurfaceShaderError

MaterialVariant.SurfaceShaderError: string? = ""

The latest surface-shader compilation error, or nil when no error is available.

Thickness

MaterialVariant.Thickness: number = 0.2

The thickness of the stroke or shell.

TilingBreak

MaterialVariant.TilingBreak: number = 0

The strength of texture variation used to reduce visible repetition.

Transmission

MaterialVariant.Transmission: number = 0

The fraction of light transmitted through the surface.

Methods

GetExecutionGroup

MaterialVariant:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

GetShaderParameter

MaterialVariant:GetShaderParameter(index: number): (number, number, number, number)

Returns the four numeric components stored in a shader parameter slot.

SetShaderParameter

MaterialVariant:SetShaderParameter(index: number, value: number | boolean | Vector2 | Vector3 | Color3 | { number }): ()

Writes a shader parameter slot from a scalar, boolean, vector, color, or numeric array.

Inherited members

Inherited47

Instance