pub enum Compat {
ProjectM,
MilkDrop2,
}Expand description
Which reference behaviour the renderer follows where MilkDrop 2 (third_party/md2) and
projectM differ. Default: projectM.
Every divergence handled by this switch (see Compat::rules):
| item | ProjectM | MilkDrop2 |
|---|---|---|
_c3.w/_c4.w (vol, vol_att) | (bass+mid+treb)*0.333 | 0.3333*treb (C comma-operator bug) |
_c12.y (mip_y) | from height | from width (typo) |
_c1 (aspect “sd”) | zeros | aspect for the sd variant |
| no-shader warp decay | min(decay,1) as float, no 8-bit rounding | (int)(decay*255)&0xFF (truncated, wraps) |
| vertex colours (waves, shapes, borders, mv, echo) | float, modulo-wrapped like & 0xFF when out of 0..1 | 8-bit truncated |
| no-shader comp hue tint | always applied | only if fShader > 0.001, blended by fShader |
| thick / dots main-wave passes | whenever thick || dots | additionally needs texsize >= 512 |
| custom-shape thick outline offset | 1/W (half a pixel) | 2/W (one pixel) |
| motion vectors: first frame | skipped | drawn |
| motion vectors: min length / lookup | 1.25 px, geometrically correct row | 1 px, mirrored-row lookup (ReversePropagatePoint) |
comp-shader sampler_main | current frame (after waves/borders) | previous frame (m_lpVS[0] in ApplyShaderParams) |
warp mesh ang seam | no fix (interpolates across the +-pi seam row) | ang patched to -pi / +pi per half |
| comp mesh UV | uv + 0.5/size (half-texel) | exact (the D3D9 half-pixel compensation nets to 0) |
warp-shader VsOut.diffuse | (decay, decay, decay, 1) | (1, 1, 1, 1) |
| no-shader composite hue-tint corners | shade[0..1] at the top corners (projectM draws the quad in its flipped frame) | shade[0..1] at the bottom corners |
blur pass 0 vertical +1 texel bias | -1 (projectM samples the upside-down stored source with uv.y flipped, so the bias goes up) | +1 (down) |
| warp mesh cell diagonal | bottom-left to top-right in image space (projectM’s mesh row 0 is the top) | top-left to bottom-right |
| no-shader composite / filter quad diagonal | TL,TR,BL,BR strip: split along top-right to bottom-left (hue-tint colours interpolate differently) | triangles (0,1,2),(2,1,3) of geom::echo_quad (bottom-right to top-left) |
| no-shader echo / gamma quad size | scaled by VideoEcho’s aspectMultX/Y (x stretched by H/W on portrait targets, UVs unchanged) | 1 + 1/size |
| no-shader gamma pass count | (int)(gamma - 0.0001) + 1 | (int)(gamma - 0.001) + 1 |
| lines / points | GL rasterisation rules emulated exactly (StrokeRaster) | D3D9 thin quads |
| custom-wave dots | the 2n-1 vertices of SmoothWave, always 1 px (gl_PointSize ignored) | the n source points, 1 + thick px |
| custom-wave thick offset | 1/W ndc in x and y (half a pixel in x, H/2W px in y) | 2/W, 2/H (one pixel) |
rot_* uniforms | translation row dropped (glm::mat3x4 of a mat4: only the 3 rotation columns are uploaded) | float4x3 incl. the translation row |
| first frame of a preset whose shaders sample blur (the frame that allocates the blur textures) | shapes, waves, main wave, darken centre, borders lost (BlurTexture::Update restores FBO 0) | drawn |
| custom wave / shape slots that run | 4 each (CustomWaveformCount, CustomShapeCount; slots 4..15 are ignored) | 16 each |
warp shader sampler_main (first main sampler in name order) | filter linear, address from bTexWrap (WarpedBlit rebinds unit 0) | whatever the shader’s sampler prefix says |
preset change (Transition::Soft) | image-space cross-fade of two independently rendered presets by one of six built-in transition shaders (md2_preset_blend = false) | MD2’s own blend inside one frame pipeline: both states’ equations run, per-vertex UVs blended by a random pattern, old/new shaders drawn as alpha-tiled passes (md2_preset_blend = true) |
Not switchable (identical in both): blur chain, blur source (previous frame image), blur min/max “push apart” typo.
Variants§
ProjectM
projectM’s behaviour (the default).
MilkDrop2
MilkDrop 2’s behaviour (Direct3D 9 semantics).
Implementations§
Trait Implementations§
impl Copy for Compat
impl Eq for Compat
impl StructuralPartialEq for Compat
Auto Trait Implementations§
impl Freeze for Compat
impl RefUnwindSafe for Compat
impl Send for Compat
impl Sync for Compat
impl Unpin for Compat
impl UnsafeUnpin for Compat
impl UnwindSafe for Compat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.