UniversalMaterial
Ergonomic wrapper and fluent builder around a ShaderMaterial backed by
res://addons/pattern_material/shaders/pattern_replace.gdshader.
Combines Faces, Glyphs, SpritesheetAtlas, Patterns, PatternGenerator, and Palette
with typed helper methods for configuring projection modes, transforms, wave motions,
outlines, bevels, 3D cel shading, drop shadows, retro dithering, dissolve wipes,
backdrop refraction, and vertex effects.
Constants
Constructors
Preset factory: 90s comic book halftone print with dithered lighting and hatched drop shadow.
Preset factory: glossy enamel pin badge with metallic bevel and inner/outer rim.
Preset factory: kaleidoscopic VHS glitch portal with chromatic RGB split and spherical/radial symmetry.
Instance methods
Copies all configured shader parameters onto another ShaderMaterial.
Assigns the underlying ShaderMaterial onto a GeometryInstance3D (material_override),
CSGShape3D / CanvasItem (material), or MeshInstance3D mesh surface.
Ensures pattern_replace.gdshader is assigned to the underlying ShaderMaterial when running in Godot.
Writes to_tres to path on disk and returns the resolved filesystem path.
Configures 3D surface mode (enables tile_base_texture or disables use_base_texture for pure pattern brushes).
Configures the material to display an icon cell from any SpritesheetAtlas.
Configures screen-space backdrop effects (refraction, pixelation, frosted blur, chromatic split, and backdrop blend modes).
Configures Win98 / sticker inner bevel & emboss lighting.
Configures 3D directional Cel / Bayer-dithered toon lighting.
Configures fg_color, bg_color, and optional outline_color / unreplaced_color using Palette indices, names, or Colors.
Configures pattern-driven dissolve wipe.
Configures 4x4 Bayer matrix dithering.
Configures the 2.5D offset paper-cutout drop shadow (with optional Bayer dither or pattern hatch).
Configures the material to display a face icon from Faces (res://textures/fontawesome/faces.svg).
Configures 3D Fresnel rim highlighting / pattern inversion.
Assigns a procedural PatternGenerator to custom_pattern on the material.
Configures the material to display a badge glyph from Glyphs (res://textures/fontawesome/letter_glyphs.svg).
Configures outline stroke parameters including optional boiling lines and outline color mode.
Sets a shader parameter on both the underlying Godot ShaderMaterial (when active)
and the local parameter mirror for inspection/testing.
Assigns custom_pattern from Patterns (res://addons/pattern_material/textures/patterns/*.svg).
Assigns a procedural PatternGenerator to custom_pattern.
Configures pattern compositing blend mode, opacity, and black/white inversion.
Configures linear UV drift speed and periodic wave oscillation for pattern position.
Configures which channel or target color is replaced by the pattern, plus hard-edge contour snapping.
Configures VHS glitch and CRT scanlines.
Configures spatial UV wave/ripple distortion across the pattern.
Configures continuous angular spin and periodic pendulum wave swing for pattern rotation.
Configures periodic breathing/pulsing oscillation for pattern scale.
Configures surface pixelation and prismatic RGB channel split on the pattern itself.
Applies a curated Palette::Theme (setting fg_color, bg_color, outline_color, unreplaced_color, and optional mid_color).
Configures choppy 90s / stop-motion FPS time quantization.
Configures static UV transform, tiling scale, rotation, mirroring, and N-fold kaleidoscope symmetry.
Configures surface transparency, per-region cutout/translucency, and 90s screen-door dithered opacity.
Configures the 3-color tritone palette ramp (bg_color -> mid_color -> fg_color).
Configures vertex billboarding, 3D surface waves, or paper cutout sway.
Serializes this UniversalMaterial configuration to a Godot 4 .tres ShaderMaterial string.
Nested types
- UniversalMaterial::BackdropBlendMode
- UniversalMaterial::BillboardMode
- UniversalMaterial::BlendMode
- UniversalMaterial::OutlineColorMode
- UniversalMaterial::OutlineMode
- UniversalMaterial::ParamValue
- UniversalMaterial::PositionWaveMode
- UniversalMaterial::ProjectionMode
- UniversalMaterial::ReplaceMode
- UniversalMaterial::RippleMode
- UniversalMaterial::RotationWaveMode
- UniversalMaterial::ScaleWaveMode
- UniversalMaterial::VertexMotionMode