fix(code): sharper hedgehog rendering on Retina displays#2219
Draft
thmsobrmlr wants to merge 2 commits into
Draft
fix(code): sharper hedgehog rendering on Retina displays#2219thmsobrmlr wants to merge 2 commits into
thmsobrmlr wants to merge 2 commits into
Conversation
Patch @posthog/hedgehog-mode to use linear instead of nearest texture sampling. Pixi renders at devicePixelRatio, so on Retina the 80x80 source sprites were being upscaled with chunky 2x2 texel blocks. Generated-By: PostHog Code Task-Id: 9a2867a2-c109-474c-a88b-393a2023e9f3
Generated-By: PostHog Code Task-Id: 9a2867a2-c109-474c-a88b-393a2023e9f3
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
@posthog/hedgehog-modeto uselinearinstead ofnearesttexture sampling on sprite sources.nearestsampling rendered each texel as a chunky 2x2 block. Linear sampling interpolates, giving a smoother result.patchedDependenciesinpnpm-workspace.yaml; verified the patch applies cleanly onpnpm install.Tradeoff
This trades the pixel-art crispness for slight softness. If we want to keep the pixel-art aesthetic, the alternative is shipping 2x source sprites upstream.
Test plan
Generated-By: PostHog Code
Task-Id: 9a2867a2-c109-474c-a88b-393a2023e9f3