bevy_symbios_texture
Procedural, tileable texture generation for Bevy.
Generates albedo, normal, roughness (ORM), and optional emissive maps entirely on the CPU — no asset files required. Generation is multi-core (rows are produced in parallel) and seamlessly tileable for all surface textures via toroidal 4-D noise mapping. Alpha-masked card textures (leaf, twig, window, stained glass, iron grille, chain-link, log-end) produce per-pixel transparency and do not tile. Sprite-atlas generators (soft disc, spark, snowflake, puff, ring, petal, shard, leaf sprite, flame, flower) bake alpha-silhouette particle-billboard sheets where every atlas cell is a per-cell-seeded variant of the same config.
Bevy compatibility
| bevy_symbios_texture | Bevy |
|---|---|
| 0.4 – 0.6 | 0.18 |
Installation
[]
= "0.6"
The optional egui feature adds editor widgets for every config type
(required for the texture_viewer example):
[]
= { = "0.6", = ["egui"] }
Migrating from 0.5 to 0.6
0.6 adds ten new generators (fabric, sand, snow, ice, lava, leaf_sprite, flame, flower, chain_link, log_end) plus hammered and diamond-plate metal styles, and parallelises generation across cores. The breaking changes:
TextureMapgained fields. It now carriesemissive: Option<Vec<u8>>andmip_level_count: u32in addition to the three pixel buffers. Code that constructsTextureMapliterals must add these (emissive: None,mip_level_count: 1for a freshly generated base level).GeneratedHandleslikewise gainedemissive: Option<Handle<Image>>.- Mipmaps are computed on the worker thread. Async generation now returns
a
TextureMapwith the full chain already appended;map_to_imagescomputes it on demand only when absent, so most callers need no change. generate_atlasandsample_grid/sample_grid_intogainedSyncbounds to enable row-parallel generation. CustomSpriteCelltypes and 4-D noise functions must beSync(they already are in practice).- Cache identity changed. Fingerprints are now a structural hash of the
config (stable across Rust versions and platforms) rather than a hash of
the
Debugstring, andFileStoreblobs use on-disk format v3 withmanifest_versionmixed into the key. ExistingFileStorecaches are invalidated once and rebuild automatically. - Accepted visual drift. Bark and marble warp layers now use a separate
warp_octavesfield (default 3) instead of the baseoctaves, so default output shifts slightly. Configs serialised before 0.6 still deserialise (the field defaults to 3).
Quick start
Synchronous (blocking)
Suitable for startup systems or contexts where a small generation time is acceptable.
use *;
use ;
Asynchronous (non-blocking, recommended)
Offloads pixel math to a private, bounded rayon thread pool (default 4
concurrent tasks; configurable via AsyncTextureConfig::pool_threads) so the
main thread is never stalled. On WASM, falls back to Bevy's
AsyncComputeTaskPool.
Within each texture, rows are generated in parallel: async tasks work-steal
across the private pool (so pool_threads remains the CPU cap), while direct
synchronous generate() calls parallelise on the caller's rayon pool —
usually the global one, using every core. Output is byte-identical to
serial generation.
If rayon::ThreadPoolBuilder::build() fails at first init (out-of-memory, OS
thread limit, sandboxed environments) the library logs a warning and falls
back to running each generator inline on the calling thread. Texture
generation still works — slower and blocking the spawning thread — instead of
panicking.
use *;
use ;
Dropping a PendingTexture entity before generation completes sets a
cancellation flag; tasks that have not yet started exit without doing any work.
One-shot procedural materials
build_procedural_material_async collapses the StandardMaterial-allocate +
PendingTexture-spawn + post-completion-patch dance into a single call. Define
a MaterialSettings (PBR fields + a TextureConfig enum that selects the
generator), call the helper, and use the returned handle immediately:
use ;
Texture cache
To avoid regenerating the same (generator, config, size) tuple across
spawns, insert a TextureCache resource:
use ;
app.insert_resource;
// or, for cross-process persistence:
// app.insert_resource(TextureCache::file("./.texture-cache", manifest_version)?);
Cache hits return previously-uploaded Handle<Image> clones synchronously
and skip the rayon dispatch entirely. Cache keys derive from a fingerprint
of the config struct, so any field change automatically invalidates the
prior entry. manifest_version is mixed into every FileStore on-disk
key, so bumping it rotates the persisted cache without deleting the
directory — use it when generator internals change without a config-field
change.
The library ships two built-in stores — MemoryStore (bounded, FIFO
eviction, default) and FileStore (binary blobs on disk) — and exposes the
TextureCacheStore trait for custom backends. FileStore persists the raw
pixel blobs as generation completes and re-uploads them (regenerating
mipmaps) on the first hit after a restart, so warm caches survive across
processes.
Animated parameter curves
Time-varying weathering, age, and seasonal change are first-class via the
AnimatedProceduralMaterial component plus a small set of
ParameterCurve impls (Linear, EaseInOut, Stepped, ScriptedFn).
Attach the component to a material entity and the
tick_animated_procedural_materials system regenerates the texture
whenever the curve's output changes:
use ;
let rust = Linear ;
let base = default;
let animator = new
.with_min_regen_interval; // throttle regeneration to 4 Hz
Two thresholds gate regeneration: a wall-clock cooldown
(min_regen_interval, default 0.25 s) and fingerprint equality. Stepped
or plateaued curves cost essentially nothing once the value stops changing.
For sub-second smoothness across the steady-state pixels, drive a fragment-shader uniform on the material — generator output is RGBA8 and is the wrong knob for sub-frame interpolation.
Compute-shader fast path
A wgpu compute-shader port of the hottest generators (FBM-based bark, brick, marble) is on the roadmap but not implemented. The remaining work — porting toroidal noise to WGSL with bit-equivalent CPU/GPU output, dispatch + readback plumbing, a feature flag that swaps in the GPU path when available, and a benchmark suite — is multi-week and was deliberately deferred so this release could ship the asynchronous + cached + animated path on a known-good CPU baseline.
If you need realtime texture editing at 60 FPS today, the alternatives are:
- Rely on the row-parallel CPU path: on a modern many-core desktop the heaviest generator (bark) renders a 512² map in ~20 ms, so interactive editing at moderate resolutions is already feasible without the GPU port.
- Bake the texture once via the regular CPU path and animate a material uniform (rust mask weight, colour blend, etc.) in the fragment shader.
- Use
AnimatedProceduralMaterialwith a coarsemin_regen_intervaland accept the staircase update cadence.
Generators
Surface textures (tileable)
All tileable generators produce three seamlessly-repeating maps:
| Map | Format | Contents |
|---|---|---|
albedo |
Rgba8UnormSrgb |
Base colour |
normal |
Rgba8Unorm |
Tangent-space normal (R=X, G=Y, B=Z) |
roughness |
Rgba8Unorm |
ORM: R=Occlusion, G=Roughness, B=Metallic |
emissive |
Rgba8UnormSrgb |
Optional emissive / glow map |
Upload with map_to_images to get repeat-wrapping samplers. When a
generator produces an emissive map the polling systems assign it to
StandardMaterial::emissive_texture; Bevy multiplies it by the material's
emissive colour factor, which the material flow auto-defaults to white when
MaterialSettings::emission_color / emission_strength are left unset, so
the glow shows out of the box. Set them only to tint or brighten beyond the
map's encoded values.
Bark
Domain-warped FBM noise with an anisotropic Worley plate layer for rhytidome furrows, producing fibrous, streaked bark grain.
use BarkConfig;
let config = BarkConfig ;
Rock
Ridged multifractal noise for cracked, faceted stone.
use RockConfig;
let config = RockConfig ;
Ground
Blended dual-scale FBM for organic soil / dirt surfaces.
use GroundConfig;
let config = GroundConfig ;
Brick
Grid-based SDF with per-cell colour hashing and configurable mortar/bonding pattern.
use BrickConfig;
let config = BrickConfig ;
Plank
Anisotropic grain FBM with domain warp, Worley knots, and horizontal joint gaps. Each plank row has an independent de-correlated grain phase.
use PlankConfig;
let config = PlankConfig ;
Concrete
Smooth FBM surface relief with optional horizontal formwork-panel seams and scattered air-pocket pits.
use ConcreteConfig;
let config = ConcreteConfig ;
Metal
Brushed metal (anisotropic FBM scratches), standing-seam roof panels,
hand-hammered dimples, or diamond tread plate — all with optional rust-patch
weathering. For Hammered and DiamondPlate, scale sets the dimple /
stud count across the tile.
use ;
let config = MetalConfig ;
Shingle
Overlapping roof shingles or tiles with configurable profile shape, moss growth, and staggered bonding.
use ShingleConfig;
let config = ShingleConfig ;
Pavers
Square or flat-top hexagonal paving stones with grout joints, per-stone colour variance, and a rounded-box SDF bevel.
use ;
let config = PaversConfig ;
Stucco
High-frequency FBM bumps over a flat matte base — typical of sand-float or pebble-dash exterior render. Entirely matte with zero metallic response.
use StuccoConfig;
let config = StuccoConfig ;
Ashlar
Irregular cut-stone masonry with per-block colour variance, chisel-edge darkening, and configurable mortar joints.
use AshlarConfig;
let config = AshlarConfig ;
Cobblestone
Voronoi cell decomposition producing domed, irregularly shaped stones separated by mud/dirt gaps.
use CobblestoneConfig;
let config = CobblestoneConfig ;
Marble
Domain-warped FBM noise passed through a sinusoidal vein function for polished marble or granite with thin dark veins on a light background.
use MarbleConfig;
let config = MarbleConfig ;
Thatch
Dense fibrous roofing material with anisotropic straw fibres, lateral domain-warp wiggle, and layered bundle overlap shadows.
use ThatchConfig;
let config = ThatchConfig ;
Corrugated
Corrugated metal sheets with sine-wave ridges and valley-concentrated rust weathering.
use CorrugatedConfig;
let config = CorrugatedConfig ;
Asphalt
Three-band toroidal FBM (macro staining, micro roughness, aggregate flecks) for tarmac / asphalt with exposed stone chips.
use AsphaltConfig;
let config = AsphaltConfig ;
Sand
Wind-rippled sand: a directional sine ridge field phase-warped by FBM so crests meander and merge, plus grain micro-relief and thresholded bright flecks (exposed sparkling grains read as local smooth spots in the ORM).
use SandConfig;
let config = SandConfig ;
Snow
Wind-drifted snow: soft FBM relief with a cool shadow tint in the troughs and thresholded sparkle flecks — crystals that brighten the albedo and drop ORM roughness to near zero for specular glints.
use SnowConfig;
let config = SnowConfig ;
Ice
Polished lake ice: a near-mirror pale-blue base crossed by thin recessed crack veins (sinusoidal bands over FBM contours), with frost patches that whiten the colour and raise roughness toward matte.
use IceConfig;
let config = IceConfig ;
Wainscoting
Wood-panel wainscoting with recessed panel faces, rail/stile framing, and anisotropic grain FBM with domain warp.
use WainscotingConfig;
let config = WainscotingConfig ;
Fabric
Plain-weave cloth: perpendicular warp/weft threads as half-cylinder profiles, over/under crossing relief, fibre fuzz, and yarn-mottle tinting. Match the two colours for solid cloth or contrast them for two-tone weaves.
use FabricConfig;
let config = FabricConfig ;
Encaustic
Decorative ceramic tiles with glazed surfaces in configurable geometric patterns (checkerboard, octagon, diamond).
use ;
let config = EncausticConfig ;
Alpha-masked cards
Card generators produce an RGBA8 texture where albedo.alpha encodes the
silhouette (0 = fully transparent, 255 = fully opaque). Upload with
map_to_images_card so the sampler does not tile and the alpha silhouette
does not bleed at edges.
Leaf
A discrete leaf silhouette with procedural venation: midrib, secondary veins, a Perlin venule (tertiary vein) network, Worley capillaries, and optional lobed margins.
use LeafConfig;
let config = LeafConfig ;
LeafSampler can also be used directly for per-pixel evaluation without
going through the full generator (e.g., inside a twig compositor):
use ;
let sampler = new;
if let Some = sampler.sample
Twig
A composite foliage card: a tapered, organically curved stem carrying multiple leaf cards. Supports two phyllotaxis modes:
- Monopodial (
sympodial: false) — opposite leaf pairs on a straight axis with a terminal leaf at the apex. - Sympodial (
sympodial: true) — alternate leaves on a zigzag axis, with a terminal leaf at the apex.
use FRAC_PI_2;
use TwigConfig;
use LeafConfig;
let config = TwigConfig ;
Window
An SDF-based window card with configurable frame, mullions/muntins, and per-pane glass. The alpha channel is transparent outside the frame and semi-transparent over glass panes.
use WindowConfig;
let config = WindowConfig ;
Stained Glass
Voronoi-based stained-glass panel with lead came borders and semi-transparent coloured glass panes. Glass alpha is 180 (semi-transparent); lead is 255 (fully opaque).
use StainedGlassConfig;
let config = StainedGlassConfig ;
Iron Grille
Rectangular or round-bar iron grille / portcullis with configurable bar count and joint-concentrated rust weathering.
use IronGrilleConfig;
let config = IronGrilleConfig ;
Chain-Link
A woven diamond wire mesh: two cylindrical wire families at ±45° with over/under crossing relief and rust pooling at the joints. Transparent between the wires.
use ChainLinkConfig;
let config = ChainLinkConfig ;
Log End
The sawn end of a log: irregular round silhouette, FBM-wobbled concentric
growth rings, optional radial drying cracks, and a streaked bark rim.
Completes the wood set alongside bark and plank.
use LogEndConfig;
let config = LogEndConfig ;
Lava
Cooling lava: dark basalt plates from a toroidal Voronoi decomposition,
separated by molten cracks that drive the emissive map — the glow colour
ramps with crack depth and is written to StandardMaterial::emissive_texture.
The material flow auto-enables a white emissive factor when a glow map is
present, so lava glows out of the box; set emission_color /
emission_strength only to tint or brighten it.
use LavaConfig;
let config = LavaConfig ;
Sprite atlases
The sprite family produces small alpha-silhouette cards aimed at particle
billboards. Unlike the foliage cards, each sprite generator can bake a
variant_rows × variant_cols atlas in a single image: every cell renders
the same config with a per-cell derived seed, so a particle system using
random atlas frames gets per-particle shape variety from one texture bake.
Atlas dimensions are clamped to 1..=16 per axis; 1 × 1 bakes a single
sprite. Soft fractional alpha is encouraged — glows and mist fade out
smoothly rather than cutting like foliage cards.
Shared scaffolding (the SpriteCell trait, the generate_atlas driver, and
the deterministic CellRng parameter stream) lives in the sprite module.
Upload with map_to_images_card; sprites never tile.
use ;
let map = new
.generate
.expect;
let handles = map_to_images_card;
Soft Disc
Radial-falloff disc with a solid core and tunable halo — the workhorse particle sprite: fireflies, embers, mist motes, bokeh glints, additive glows.
use SoftDiscConfig;
let config = SoftDiscConfig ;
Spark
N-pointed streak burst: a bright core with radial arms fading toward their tips. Embers, glints, impact sparks, magic sparkles.
use SparkConfig;
let config = SparkConfig ;
Snowflake
Dendritic flake with N-fold symmetry: a central plate, one main arm per sector, and paired side branches. Per-variant jitter is where the "no two snowflakes alike" character comes from.
use SnowflakeConfig;
let config = SnowflakeConfig ;
Puff
Billowy blob of domain-warped fractal noise masked by a soft radial falloff. Dust motes, smoke, fog banks, sea mist.
use PuffConfig;
let config = PuffConfig ;
Ring
Soft annulus with optional angular waviness: shockwaves, water-drop ripples, magic circles, halos.
use RingConfig;
let config = RingConfig ;
Petal
A single flower petal: an obovate blade with a soft throat-to-edge gradient
and an optional notched tip. Petal-fall particles, blossom decals, or — at
1 × 1 — a building block for procedural flowers.
use PetalConfig;
let config = PetalConfig ;
Shard
Irregular rock-chip / debris-flake silhouette: a jittered polygon with a darkened rim and noise-grained interior. Impact debris, crumbling masonry, shattered ice, kicked-up gravel.
use ShardConfig;
let config = ShardConfig ;
Flame
A single tongue of fire: a teardrop envelope displaced by fractal turbulence that grows toward the tip, with a core→mid→tip colour ramp. Per-variant cells jitter lean, elongation, and turbulence phase, so random atlas frames read as flicker. Pairs well with additive blending.
use FlameConfig;
let config = FlameConfig ;
Flower
A radially composed blossom: petal blades (the petal sampler re-aimed
outward) under a domed, stamen-dotted centre disc — the sprite counterpart
of how twig composites leaves. Every petal in every variant draws its
own jitter stream.
use FlowerConfig;
use PetalConfig;
let config = FlowerConfig ;
Leaf Sprite
The atlas counterpart of the single-leaf foliage card: every cell bakes a per-cell-seeded leaf variant with bounded jitter on serration, lobes, vein count, and a green-preserving colour tint. Falling-foliage particle systems get per-particle leaf variety from one bake.
use LeafConfig;
use LeafSpriteConfig;
let config = LeafSpriteConfig ;
Evolutionary parameter search (genetics)
All config types implement symbios_genetics::Genotype, making them
compatible with the evolutionary algorithms in the symbios-genetics crate
(SimpleGA, Nsga2, MapElites).
Each field is independently perturbed during mutation and drawn uniformly from one of two parents during crossover:
use Genotype;
use BarkConfig;
use SeedableRng;
let mut config = default;
let mut rng = seed_from_u64;
config.mutate; // perturb each field with 30 % probability
let parent_b = BarkConfig ;
let child = config.crossover;
The texture_viewer example uses this to mutate any displayed material when
you click Mutate.
The Genotype implementations and the egui editor widgets are generated by
declarative macros (impl_genotype! / impl_config_editor!) rather than
hand-written per-config boilerplate. Each macro invocation declares the
config struct, field kinds (seed, f64, colour, enum, etc.), and optional
post-hooks for tiling-invariant fixups, keeping the per-config call site
small while covering all 40 config types.
TextureConfig itself also implements Genotype (mutation delegates to the
wrapped config; crossover recombines like variants field-wise) and exposes
registry-derived helpers — all_defaults() for dropdowns and benches,
module_name() for stable identifiers, generate_sync() for synchronous
dispatch, and (behind the egui feature) ui::texture_config_editor for
variant-generic parameter editing. The texture_viewer example and the
criterion bench suite are built entirely on these, so they extend
automatically when a generator is added to the registry.
Architecture
TextureGenerator (trait)
│
│ Tileable surface textures
├── BarkGenerator ─── ToroidalNoise (domain-warped FBM + Worley plates)
├── RockGenerator ─── ToroidalNoise (RidgedMulti)
├── GroundGenerator ─── ToroidalNoise × 2 (dual-scale FBM)
├── BrickGenerator ─── ToroidalNoise FBM + rounded-box SDF grid
├── PlankGenerator ─── ToroidalNoise FBM + Worley knots (anisotropic)
├── ConcreteGenerator ─── ToroidalNoise FBM + cosine formwork + pit FBM
├── MetalGenerator ─── ToroidalNoise FBM (brushed/standing-seam) + rust FBM
├── ShingleGenerator ─── ToroidalNoise FBM + sawtooth overlap ramp
├── PaversGenerator ─── ToroidalNoise FBM + square/hex SDF grid
├── StuccoGenerator ─── ToroidalNoise FBM (high-frequency, matte)
├── AshlarGenerator ─── ToroidalNoise FBM + irregular SDF grid + chisel edge
├── CobblestoneGenerator─── toroidal Voronoi (domed F1, mud gap at F2−F1)
├── MarbleGenerator ─── ToroidalNoise FBM (domain-warped sinusoidal veins)
├── ThatchGenerator ─── ToroidalNoise FBM (anisotropic fibre + sawtooth layers)
├── CorrugatedGenerator ─── sine-wave ridge profile + rust FBM
├── AsphaltGenerator ─── ToroidalNoise FBM × 3 (macro/micro/aggregate)
├── WainscotingGenerator─── ToroidalNoise grain FBM + panel margin SDF
├── EncausticGenerator ─── ToroidalNoise glaze FBM + geometric pattern SDF
├── FabricGenerator ─── perpendicular thread lattice + over/under weave
├── SandGenerator ─── warped sine ripples + grain flecks
├── SnowGenerator ─── FBM drift relief + sparkle flecks
├── IceGenerator ─── sinusoidal crack veins + frost patches
├── LavaGenerator ─── toroidal Voronoi plates + emissive crack glow
│
│ Alpha-masked cards
├── LeafGenerator ─── LeafSampler (silhouette + venation)
├── TwigGenerator ─── LeafSampler × N (composite stem + leaves)
├── WindowGenerator ─── rounded-box SDF frame/mullions + FBM grime
├── StainedGlassGenerator── toroidal Voronoi + lead came SDF + grime FBM
├── IronGrilleGenerator ─── bar SDF grid + joint rust FBM
├── ChainLinkGenerator ─── diagonal wire lattice + over/under weave
├── LogEndGenerator ─── warped concentric rings + bark rim
│
│ Sprite atlases (alpha-masked cards, via sprite::generate_atlas)
├── SoftDiscGenerator ─── radial-falloff disc (core + halo)
├── SparkGenerator ─── N-armed streak burst
├── SnowflakeGenerator ─── dendritic N-fold flake
├── PuffGenerator ─── domain-warped FBM blob + radial mask
├── RingGenerator ─── soft annulus + angular waviness
├── PetalGenerator ─── obovate blade + throat/edge gradient
├── ShardGenerator ─── jittered polygon chip + grain FBM
├── LeafSpriteGenerator ─── LeafSampler atlas (per-cell leaf variants)
├── FlameGenerator ─── teardrop envelope + FBM turbulence
└── FlowerGenerator ─── PetalCell × N (radial composite blossom)
│
height_to_normal() → normal map
linear_to_srgb() → albedo encoding
│
TextureMap { albedo, normal, roughness, emissive? }
│
map_to_images() → GeneratedHandles (repeat sampler)
map_to_images_card() → GeneratedHandles (clamp sampler)
│
full mipmap chain (type-correct averaging)
Noise-in-constructor — the surface generators and the SDF-based cards
(window, stained glass, iron grille) build their noise objects
(Fbm<Perlin>, RidgedMulti<Perlin>, ToroidalNoise<…>) once in new()
and store them as struct fields. Calling generate() multiple times (e.g.
to produce size variants of the same material) skips the initialisation cost.
Worley is the exception: it contains an Rc and is therefore !Send /
!Sync, so the generators that use it (BarkGenerator, PlankGenerator)
construct it locally — and, since generation is row-parallel, once per row
inside the parallel loop (the construction cost is microseconds against the
per-row pixel work). The foliage cards (LeafGenerator, TwigGenerator —
leaf sampling also uses Worley) and the sprite generators hold only their
config and build their samplers per generate() call. The cell-decomposition
surfaces (CobblestoneGenerator, LavaGenerator) instead use a dependency-free,
Sync hash-based toroidal Voronoi (noise::toroidal_voronoi).
Workspace buffer pooling — generators that allocate large intermediate
grids (e.g. BarkGenerator, ThatchGenerator) accept an optional
Workspace via generate_with_workspace(). The workspace maintains a
pool of Vec<f64> buffers that are borrowed and returned across calls,
eliminating repeated 128 MB+ allocations at 4096×4096 resolution.
Seamless tiling is provided by ToroidalNoise, which maps 2-D UV
coordinates onto a 4-D torus so that noise wraps perfectly at every edge:
nx = cos(2π·u) · frequency
ny = sin(2π·u) · frequency
nz = cos(2π·v) · frequency
nw = sin(2π·v) · frequency
Because cos(0) = cos(2π) and sin(0) = sin(2π), u=0 and u=1 always
resolve to the same 4-D point, guaranteeing zero-seam tiling.
Normal maps are derived from the height field via central-difference gradients. For the tileable surface textures the neighbours wrap toroidally, so the normals are also seamless. For card textures (leaf, twig, window, stained glass, iron grille, and all sprites) the boundary uses clamp-to-edge so normals do not bleed across the transparent silhouette border. Sprite atlases additionally dilate heights into fully-transparent texels before derivation so the normals do not crease at silhouette edges.
Colour encoding uses a 4096-entry sRGB lookup table (built once via
OnceLock) to avoid repeated f32::powf calls during rasterisation.
A 256-entry table would be insufficient because the sRGB curve is steep
near zero; 4096 bins keep the maximum quantisation error well below one
count in u8.
Mipmap generation uses a 2×2 box filter with type-correct averaging: sRGB
values are decoded to linear light before averaging and re-encoded afterward
(avoiding dark mipmaps), normal-map XYZ vectors are averaged and renormalized
(avoiding zero-length normals in PBR shaders), and ORM values are averaged
directly in linear space. Async generation tasks precompute the full chain
on the worker thread (TextureMap::with_mips), so the main-thread upload in
the polling systems is a pure buffer move; map_to_images /
map_to_images_card compute the chain on demand for maps without one
(synchronous callers, cache loads). 16× anisotropic filtering is enabled on
all samplers.
Examples
texture_viewer
Displays an interactive material viewer with three columns: albedo (left), normal map (centre), and a 3-D PBR preview (right) with the generated material applied. Tileable surface textures are shown on a spinning cube; alpha-masked cards and sprite atlases get a gently swaying alpha-blended quad in front of a checkerboard backdrop instead, so per-pixel alpha is visible. An egui panel on the left lets you select any of the 40 generators from a dropdown, trigger a random Mutate (rate = 0.3), and edit every parameter live.
procedural_material
Side-by-side comparison of build_procedural_material_async (left cube)
against the manual PendingTexture + material-patching flow it replaces
(right cube).
animated_rust
Animates rust coverage on a metal panel from 0 % to 100 % over ten seconds
via AnimatedProceduralMaterial driving a Linear curve, throttled to
roughly four regenerations per second.
License
MIT — see LICENSE.