MilkDrop fidelity: missing keys and values that stay in the file - #613
Merged
Merged
Conversation
Keys a file leaves out: - wave_r, wave_g, wave_b, wave_x and wave_y are read with rot's value as the default (state.cpp:1389-1393, the same in the D3D9 code), and rot is still Default's 0 at that point. A file without them draws a black wave in the corner in MilkDrop; the engine had white and centred. - Custom shape colours default to red inside and green, transparent outside (state.cpp:619-626); the engine had white and black. No corpus preset leaves any of these out, and neither do ours. Values MilkDrop keeps out of the equations - wave scale and smoothing, the volume fade's switch and range, warp speed and warp scale - now come from the file with fidelity on, not from per-frame values: - Missing smoothing is 0.75 and the fade range 0.75 to 0.95. - A wave scale of 0 flattens the wave (102 corpus presets) and a warp speed of 0 stops the warp pattern (4 presets), where the old `|| 1` turned both into 1. - Through a transition, wave scale and smoothing, the fade range and warp scale blend linearly (CBlendableFloat). - Warp speed and scale are the new preset's for both meshes, as MilkDrop computes the warp frequencies once a frame from the new state (milkdropfs.cpp:1591-1597). - A custom wave takes its own preset's wave scale, unblended (2429). Measured against main, last 10 of 60 frames: - 120 control presets are identical; - of the 102 with wave scale 0, 12 change, 7 of them by more than 1%; - of the 4 with warp speed 0, one changes slightly. With fidelity off, all of them are identical, and the 900-preset sample sorts into the same classes. 3 new tests and 5 test files follow the new reads; 16/16 mutations are caught. The docs' test count follows. Refs #580, #560
README (both languages): missing values take MilkDrop's defaults down to its missing-wave-colour quirk, and the values it keeps out of the equations come from the file. ROADMAP #580: the two bullets with their measurements replace the "next" note, and the tests paragraph lists the new tests. Refs #580
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is the third #580 change. It covers missing keys and the values MilkDrop keeps out of the equations. Everything was checked against Nullsoft's code (jecassis/foo_vis_milk2 5b44cea) and the D3D9 code (BeatDrop 53d83ee), and all of it sits behind the fidelity switch.
wave_r,wave_g,wave_b,wave_xorwave_ywithrot's value as the default (state.cpp:1389-1393).rotis still 0 at that point, so a file without these keys draws a black wave in the corner. The engine drew it white and centred.|| 1fallbacks. They now come from the file:|| 1turned it into 1;|| 1turned it into 1;No corpus preset leaves out the keys in the first two bullets, and neither do ours.
Measured
Against
main, over the last 10 of 60 frames:Tests
npm test: 2187 of 2187 pass, and each commit passes on its own. The changed files also pass under Linux emulation.npm run smoke: PASS, with the userData checksums unchanged.Refs #580
Refs #560