Expand description
Procedural noise textures for the noise texture pack.
MilkDrop 2 ships every preset with a fixed set of noise textures sampled by
user comp shaders. The names and resolutions follow Geiss’s reference
implementation (mirrored in projectM’s PerlinNoise.cpp):
| Name | Shape | Channels | Used by |
|---|---|---|---|
noise_lq | 256 × 256 | RGBA8 | 74 / 168 in-the-wild comps |
noise_mq | 64 × 64 | RGBA8 | 1 / 168 |
noise_hq | 32 × 32 | RGBA8 | 42 / 168 |
noisevol_lq | 32 × 32 × 32 | RGBA8 | 4 / 168 |
noisevol_hq | 8 × 8 × 8 | RGBA8 | 77 / 168 |
Reference MilkDrop generates each byte with rand() & 0xFF and lets the
sampler’s bilinear/trilinear filtering produce smooth pseudo-noise.
Matching that exactly fixes the visual style every authored preset was
tuned against, so we mirror it: independent xorshift32 stream per
texture, seeded deterministically so reload paths produce bit-identical
frames.
The textures are generated once at engine init; the data lives in CPU memory long enough to upload to the GPU and is then dropped.
Structs§
- Noise
Pack - Full noise pack used by the comp pass. Names match MD2 sampler conventions
(
sampler_noise_lq,sampler_noisevol_hq, …) without thesampler_prefix. - Noise
Texture - Dimensions + byte payload for one noise texture. RGBA8 layout in all cases: 4 bytes per texel, tightly packed in row-major (and slice-major for the 3D textures), no padding.
- XorShift32 🔒
- Tiny deterministic PRNG. Replaces
rand()from MilkDrop’s reference without taking a workspace-wide dependency for a few hundred KB of init data. Mixed with the texture name’s first byte so the three 2D and two 3D textures don’t share a stream.