Skip to content

TextStudio2DMaterialResponseSpec

StructTextStudioTextStudio
public struct TextStudio2DMaterialResponseSpec

Compact physically inspired surface response. Presets provide finished defaults while the fluent modifiers expose the professional lighting, material, and optical controls.

WithReflection(TextStudio2DReflectionSpec)

Section titled “WithReflection(TextStudio2DReflectionSpec)”
public TextStudio2DMaterialResponseSpec WithReflection(TextStudio2DReflectionSpec reflection)

Returns a copy with an optional HDR reflection map.

Parameters

NameType
reflectionTextStudio.TextStudio2DReflectionSpec

Returns

TextStudio.TextStudio2DMaterialResponseSpec

WithDetailNormal(TextStudio2DNormalDetailSpec)

Section titled “WithDetailNormal(TextStudio2DNormalDetailSpec)”
public TextStudio2DMaterialResponseSpec WithDetailNormal(TextStudio2DNormalDetailSpec detail)

Returns a material response with optional glyph-local normal detail.

Parameters

NameType
detailTextStudio.TextStudio2DNormalDetailSpec

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public static TextStudio2DMaterialResponseSpec Preset(TextStudio2DMaterialResponseKind kind)

Returns polished, deterministic defaults for a professional material family.

Parameters

NameType
kindTextStudio.TextStudio2DMaterialResponseKind

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public TextStudio2DMaterialResponseSpec WithRelief(float width, float softness, float depth)

Returns a material response copy with the supplied relief width, softness, and depth.

Parameters

NameType
widthSystem.Single
softnessSystem.Single
depthSystem.Single

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public TextStudio2DMaterialResponseSpec WithLighting(float angle, float elevation)

Returns a material response copy with the supplied light angle and elevation.

Parameters

NameType
angleSystem.Single
elevationSystem.Single

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public TextStudio2DMaterialResponseSpec WithSurface(float roughness, float metallic, float clearcoat, float anisotropy = 0)

Returns a material response copy with the supplied roughness, metallic, clearcoat, and anisotropy settings.

Parameters

NameType
roughnessSystem.Single
metallicSystem.Single
clearcoatSystem.Single
anisotropySystem.Single

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public TextStudio2DMaterialResponseSpec WithOptics(float iridescence, float sparkle, float emission, int seed)

Returns a material response copy with the supplied iridescence, sparkle, emission, and deterministic seed settings.

Parameters

NameType
iridescenceSystem.Single
sparkleSystem.Single
emissionSystem.Single
seedSystem.Int32

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public TextStudio2DMaterialResponseSpec WithColors(Color highlight, Color shadow, Color environment)

Returns a material response copy with the supplied highlight, shadow, and environment colors.

Parameters

NameType
highlightUnityEngine.Color
shadowUnityEngine.Color
environmentUnityEngine.Color

Returns

TextStudio.TextStudio2DMaterialResponseSpec

TextStudio2DMaterialResponseSpec(TextStudio2DMaterialResponseKind, float, float, float, float, float, float, float, float, float, float, float, float, int, Color, Color, Color)

Section titled “TextStudio2DMaterialResponseSpec(TextStudio2DMaterialResponseKind, float, float, float, float, float, float, float, float, float, float, float, float, int, Color, Color, Color)”
public TextStudio2DMaterialResponseSpec(TextStudio2DMaterialResponseKind kind, float width, float softness, float depth, float lightAngle, float lightElevation, float roughness, float metallic, float clearcoat, float anisotropy, float iridescence, float sparkle, float emission, int seed, Color highlight, Color shadow, Color environment)

Creates a material response with the supplied relief, lighting, surface, optical, color, and deterministic seed settings.

Parameters

NameType
kindTextStudio.TextStudio2DMaterialResponseKind
widthSystem.Single
softnessSystem.Single
depthSystem.Single
lightAngleSystem.Single
lightElevationSystem.Single
roughnessSystem.Single
metallicSystem.Single
clearcoatSystem.Single
anisotropySystem.Single
iridescenceSystem.Single
sparkleSystem.Single
emissionSystem.Single
seedSystem.Int32
highlightUnityEngine.Color
shadowUnityEngine.Color
environmentUnityEngine.Color

public TextStudio2DMaterialResponseKind Kind { get; }

Returns

TextStudio.TextStudio2DMaterialResponseKind

public float Width { get; }

Returns

System.Single

public float Softness { get; }

Returns

System.Single

public float Depth { get; }

Returns

System.Single

public float LightAngle { get; }

Returns

System.Single

public float LightElevation { get; }

Returns

System.Single

public float Roughness { get; }

Returns

System.Single

public float Metallic { get; }

Returns

System.Single

public float Clearcoat { get; }

Returns

System.Single

public float Anisotropy { get; }

Returns

System.Single

public float Iridescence { get; }

Returns

System.Single

public float Sparkle { get; }

Returns

System.Single

public float Emission { get; }

Returns

System.Single

public int Seed { get; }

Returns

System.Int32

public Color Highlight { get; }

Returns

UnityEngine.Color

public Color Shadow { get; }

Returns

UnityEngine.Color

public Color Environment { get; }

Returns

UnityEngine.Color

public TextStudio2DNormalDetailSpec DetailNormal { get; }

Returns

TextStudio.TextStudio2DNormalDetailSpec

public TextStudio2DReflectionSpec Reflection { get; }

Returns

TextStudio.TextStudio2DReflectionSpec