Release 1.3.4: New backgrounds, bug fixes, and WarpLayer with relativistic physics#25
Open
ppamorim wants to merge 15 commits intodevelopmentfrom
Open
Release 1.3.4: New backgrounds, bug fixes, and WarpLayer with relativistic physics#25ppamorim wants to merge 15 commits intodevelopmentfrom
ppamorim wants to merge 15 commits intodevelopmentfrom
Conversation
Introduce two new GPU-rendered background types using MetalKit: - PsyLayer: kaleidoscopic mandala with domain warping, plasma, and HSV color cycling - LiquidLayer: organic flowing effect using fruit-shaped SDF contours Both layers use signed distance fields derived from the Fruit/Leaf bezier paths so concentric rings and spirals follow the apple silhouette.
Remove atan2-based angular patterns and SDF contour rings that created a visible star/cross at the center due to the atan2 singularity at the origin. Replace with multi-chain domain warping and plasma fields for smooth organic flow. Make PsyLayer more aggressive with higher frequencies, stronger contrast, and faster animation.
Metal SDF shader renders the Apple logo silhouette using two circles with aspect correction, circular bite, and a rotated ellipse leaf. Multiple concentric copies scale down toward the center with smooth cosine-based color alternation and edge glow, creating an infinite zoom tunnel animation.
Metal shader renders a 3D star field as dot particles that stretch into radial streaks during warp. Speed oscillates between calm cruise (twinkling dots) and intense warp bursts (dense streaks with central glow). Registered as "Warp Speed" in FruitType enum and preferences UI.
Update drawableSize when CAMetalLayer frame changes so the shader renders at the correct resolution instead of stretching a stale texture. Also switch WarpLayer UV normalization to a fixed reference size so particle density stays consistent across view sizes, and simplify init(layer:) presentation copies to avoid accessing invalid Metal state.
Make particles nearly stationary at idle (0.05-0.15) with speed-dependent scroll rate, increase warp speed range (8-14) for more dramatic effect, and replace generic easeInOut with back-easing curves that reverse before accelerating and overshoot before settling.
Add aberration, Doppler shift, beaming, streak taper, and dynamic tunnel vignette to the warp shader. Increase star density at idle, add gentle deceleration easing, micro vibrations during speed transitions, and longer idle phases. Update CHANGELOG and README with all 1.3.4 features and fixes.
Break up uniform layer spacing with a small hash-based offset so stars don't scroll in lockstep across depth layers.
Raise base brightness from 1.0 to 2.0 so twinkling stars are more visible when not in warp mode.
Reverts all changes to FruitScreensaver.swift that broke multi-monitor support and caused FPS degradation.
Move all speed-dependent smoothstep/mix computations from fragment shader to CPU-side precomputation, passed via expanded uniform buffer. Replace exp() with rational falloff, reduce layers 30->20, add warp_hash2 to halve hash calls, and use Reinhard tonemapping.
Use per-component hash multipliers to prevent warp_hash2 from producing identical x/y outputs when input has x==y, which caused stars to align on the diagonal. Also skip twinkle/color work for negligible-brightness stars.
Constrain fragment shader execution to the fruit's bounding area across all layer types (Warp, Puppy, Psy, Liquid, CircularGradient, LinearGradient, Solid), skipping GPU work for pixels outside the visible fruit region. WarpLayer also gains CPU-side pre-computation of per-layer constants.
Dark North Atlantic ocean simulation featuring rolling wave fronts, deep Titanic-style blue palette, foam and spray on crests, and visible surface current swirls via chained FBM.
Add DebugStatsView with CATextLayer-based rendering for FPS, per-process CPU usage (Mach thread info), and system GPU utilization (IOKit). Wired into both FruitScreensaver and PreferencesViewController behind a showDebugStats toggle. Fix missing Metal resource copies in CircularGradientLayer, LinearGradientLayer, and SolidLayer init(layer:). Update multiscreen lame-duck docs with window-identity safe variant.
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.
Summary
Test plan