#[non_exhaustive]pub struct CompatRules {Show 38 fields
pub vol_is_comma_bug: bool,
pub mip_y_from_width: bool,
pub c1_is_zero: bool,
pub decay_8bit: bool,
pub quantize_vertex_colors: bool,
pub hue_tint_always: bool,
pub thick_needs_512: bool,
pub pm_waveforms: bool,
pub shape_thick_full_pixel: bool,
pub mv_skip_first_frame: bool,
pub mv_min_len_px: f32,
pub mv_mirrored_lookup: bool,
pub comp_reads_previous: bool,
pub ang_seam_fix: bool,
pub comp_uv_half_texel: bool,
pub shader_warp_diffuse_is_decay: bool,
pub rot_translation_dropped: bool,
pub shade_top_first: bool,
pub blur_src_flipped: bool,
pub warp_diag_flipped: bool,
pub echo_diag_flipped: bool,
pub echo_quad_aspect: bool,
pub gamma_pass_eps: f32,
pub gl_strokes: bool,
pub wave_dots_smoothed: bool,
pub point_size_honored: bool,
pub wave_thick_ndc_inc: bool,
pub wave_point_f64_aspect: bool,
pub no_mipmaps: bool,
pub warp_uv_on_gpu: bool,
pub main_alpha: bool,
pub shape_main_nearest: bool,
pub blur_alloc_drops_overlays: bool,
pub gl_fill_ties: bool,
pub pm_border_mesh: bool,
pub custom_slots: usize,
pub warp_main_sampler_from_wrap: bool,
pub md2_preset_blend: bool,
}Expand description
The individual behaviours selected by a Compat value (see the table there for the
projectM / MilkDrop 2 values of each).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.vol_is_comma_bug: boolvol / vol_att follow MD2’s comma-operator bug (0.3333*treb).
mip_y_from_width: bool_c12.y (mip_y) is derived from the width instead of the height (MD2 typo).
c1_is_zero: bool_c1 (aspect “sd”) is all zeros.
decay_8bit: boolThe no-shader warp decay is truncated to 8 bits and wraps, (int)(decay*255)&0xFF.
quantize_vertex_colors: boolVertex colours are 8-bit truncated; otherwise float, modulo-wrapped like & 0xFF when outside 0..1.
hue_tint_always: boolThe no-shader composite hue tint is always applied; otherwise only if fShader > 0.001, blended by fShader.
thick_needs_512: boolThick / dots main-wave passes additionally need a texture size of at least 512.
pm_waveforms: boolMain waveform geometry/alpha follow projectM Waveforms/*.cpp (wavegen::main_wave_geometry_projectm)
instead of the MD2 DrawWave port (wavegen::main_wave_geometry).
shape_thick_full_pixel: boolThe custom-shape thick outline offset is one pixel (2/W) instead of half a pixel (1/W).
mv_skip_first_frame: boolMotion vectors are skipped on the first frame.
mv_min_len_px: f32Minimum motion-vector length in pixels.
mv_mirrored_lookup: boolMotion-vector lookup uses MD2’s mirrored row (ReversePropagatePoint).
comp_reads_previous: boolThe composite shader’s sampler_main reads the previous frame instead of the current one.
ang_seam_fix: boolThe warp mesh ang seam is patched to -pi / +pi per half instead of interpolating across the seam row.
comp_uv_half_texel: boolThe composite mesh UV gets a half-texel offset (uv + 0.5/size).
shader_warp_diffuse_is_decay: boolA warp shader’s VsOut.diffuse is (decay, decay, decay, 1) instead of (1, 1, 1, 1).
rot_translation_dropped: boolThe translation row of the rot_* uniforms is dropped (glm::mat3x4 of a mat4).
shade_top_first: boolThe no-shader composite hue-tint colours shade[0..1] sit at the top corners instead of the bottom ones.
blur_src_flipped: boolBlur pass 0 samples an upside-down source, so its vertical +1 texel bias is -1.
warp_diag_flipped: boolWarp mesh cells are split bottom-left to top-right in image space instead of top-left to bottom-right.
echo_diag_flipped: boolThe no-shader composite / filter quad is split top-right to bottom-left instead of bottom-right to top-left.
echo_quad_aspect: boolprojectM stretches the echo / gamma quad by aspectMultX/Y of VideoEcho::Draw (geom::echo_aspect_mult):
identity for landscape targets, a horizontal H/W magnification of the centre for portrait ones. MD2 draws the
plain 1 + 1/size quad.
gamma_pass_eps: f32Epsilon of the gamma pass count of the no-echo composite, (int)(gamma - eps) + 1 passes: projectM
(VideoEcho::DrawGammaAdjustment) 0.0001, MD2 (ShowToUser_NoShaders) 0.001.
gl_strokes: boolLines and points follow OpenGL rasterisation rules (see StrokeRaster) instead of D3D9 thin quads.
wave_dots_smoothed: boolCustom-wave dots use the 2n-1 vertices of SmoothWave; otherwise the n source points.
point_size_honored: boolPoint sizes (1 + thick px) are honoured; otherwise points are always 1 px (gl_PointSize ignored).
wave_thick_ndc_inc: boolThe custom-wave thick offset is 1/W ndc in x and y; otherwise 2/W, 2/H (one pixel).
wave_point_f64_aspect: boolCustom-wave point positions: projectM static_cast<float>((x * 2.0 - 1.0) * invAspectX) (the product is taken in
double, one rounding to f32); MD2 (float)(x * 2 - 1) * m_fInvAspectX (rounded to f32 before the product).
no_mipmaps: boolprojectM textures have a single level (no glGenerateMipmap, samplers use the plain GL_LINEAR /
GL_NEAREST min filter), so tex2D never blends mip levels and tex2Dlod / tex2Dbias read level 0.
MD2 uses D3D9 textures with a mip chain (trilinear).
warp_uv_on_gpu: boolprojectM evaluates the warp UV formula (pow, sin, cos, multiply-adds) in its vertex shader, so the
result carries the GPU’s approximations and fusion; MD2 does it on the CPU (D3DX/libm floats).
With this rule the renderer runs the warp vertex shader on the per-vertex inputs of FrameInput::warp_gpu.
main_alpha: boolprojectM: the internal images are RGBA; main starts at alpha 0, the no-shader warp keeps tex.a,
shaders write 1, overlays blend alpha with the colour factors and textured fills multiply by tex.a.
MD2 (X8R8G8B8) has no alpha: sampled alpha is 1 and nothing is written.
shape_main_nearest: boolprojectM binds the GL_NEAREST flip texture (set by TextureAttachment) for textured shapes that sample the
main image; MD2 samples it bilinearly.
blur_alloc_drops_overlays: boolprojectM: on the frame that (re)allocates the blur textures (first frame after preset load / resize) of a preset
whose shaders sample blur, BlurTexture::Update restores the wrong framebuffer, so shapes, waves, main wave,
darken-centre and borders of that frame are drawn to the default framebuffer and lost. MD2 draws them.
gl_fill_ties: boolprojectM draws in GL window space (y up), lactea’s targets are y down (wgpu / D3D9): both use the top-left
rule, so a pixel centre lying exactly on a horizontal triangle edge goes to the polygon below the edge in
wgpu and to the polygon above it in projectM. With this rule such triangle fills (borders whose
size * H / 2 is a half integer) are nudged by one sub-pixel step (geom::gl_fill_ties). MD2 (D3D9) has
the wgpu rule.
pm_border_mesh: boolBorders are one 8-vertex / 8-triangle mesh in projectM (Border.cpp, mirrored vertically by its y-flipping
projection), four rotated quads in MD2. Identical for sane sizes, different when ob + ib > 1 or a size is
negative (self-overlapping triangles).
custom_slots: usizeNumber of custom wave / custom shape slots that run: projectM CustomWaveformCount /
CustomShapeCount = 4 (the keys wavecode_4..15 / shapecode_4..15 are never read), MD2 / MAX_CUSTOM_* = 16.
warp_main_sampler_from_wrap: boolprojectM’s PerPixelMesh::WarpedBlit binds its own sampler (GL_LINEAR, GL_REPEAT / GL_CLAMP_TO_EDGE from the
per-frame wrap variable, i.e. bTexWrap) on texture unit 0 after the warp shader loaded its samplers, which
replaces the sampler of the first main descriptor (std::set order of the sampler names, main always
present): a warp shader’s sampler_main follows wrap, not the fw_/fc_/pw_/pc_ prefix. MD2 uses the
sampler declared in the shader.
md2_preset_blend: boolSoft cuts follow MilkDrop 2’s m_bBlending (state.cpp StartBlendFrom, milkdropfs.cpp RenderFrame): the old
preset’s state stays alive next to the new one inside a single frame pipeline (one renderer, old shaders in
m_OldShaders). projectM instead renders both presets to their own images and blends the finished images with
one of six transition shaders (TransitionKind).