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.

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

Name Type
kind TextStudio.TextStudio2DMaterialResponseKind
width System.Single
softness System.Single
depth System.Single
lightAngle System.Single
lightElevation System.Single
roughness System.Single
metallic System.Single
clearcoat System.Single
anisotropy System.Single
iridescence System.Single
sparkle System.Single
emission System.Single
seed System.Int32
highlight UnityEngine.Color
shadow UnityEngine.Color
environment UnityEngine.Color

public static TextStudio2DMaterialResponseSpec Preset(TextStudio2DMaterialResponseKind kind)

Returns polished, deterministic defaults for a professional material family.

Parameters

Name Type
kind TextStudio.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

Name Type
width System.Single
softness System.Single
depth System.Single

Returns

TextStudio.TextStudio2DMaterialResponseSpec

public TextStudio2DMaterialResponseSpec WithLighting(float angle, float elevation)

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

Parameters

Name Type
angle System.Single
elevation System.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

Name Type
roughness System.Single
metallic System.Single
clearcoat System.Single
anisotropy System.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

Name Type
iridescence System.Single
sparkle System.Single
emission System.Single
seed System.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

Name Type
highlight UnityEngine.Color
shadow UnityEngine.Color
environment UnityEngine.Color

Returns

TextStudio.TextStudio2DMaterialResponseSpec

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