Repository navigation
20.11: linear-mipmap, effects sharing a draw, seam-free tiles and fixes - #1767
Merged
Merged
Conversation
- Rendering: textureFilter "linear-mipmap"; every sprite vertex carries its frame, so sprites, text and tile layers keep their samples inside their own frame of the atlas (WebGL and WebGPU) - Effects: sprites through the same ShaderEffect share one draw call - Camera: Renderable#visibilityLayer and Camera2d#cullMask; the follow deadzone on whole pixels - Application: syncToDisplay; a maxfps above 120 no longer stops the game - Tiled: no seams between tiles on any renderer (uvOffset and textureSeamFix removed); GPU tile layer opacity and container fade; pre-rendered layers on every orientation, with setTile/clearTile; the trans color key; isometric ellipses projected with the tile ratio - Effects: SquishEffect kept to its frame; setTexture between batched sprites; no WebGL error after replacing or destroying a texture - Canvas keeps its drawing state across a resize; a Light2d in a hidden container is hidden too - Tests, skills, changelog (20.11 section consolidated) and the 20.11.0 version Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx
Collision shapes are placed in the frame the sprite draws in, whatever its anchor, so the hit box no longer needs shifting by half the sprite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx
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
The 20.11 rendering batch, plus the fixes found while testing it and in an adversarial review.
Added
textureFilter: "linear-mipmap": textures drawn smaller than their size sample their mipmaps. Every sprite vertex now carries its frame (the opposite corner's UV), so sprites, text and tile layers keep their samples inside their own frame of the atlas, at the level read (WebGL and WebGPU).Renderable#visibilityLayerandCamera2d#cullMask: what each camera draws (a container left out hides its subtree; aLight2dleft out neither glows nor cuts its hole).syncToDisplay: frame times counted in whole display frames, so a 60/120 Hz display gets a steady update pattern; the display's rate is relearned when it changes.trans/transparentcolor: the color key of tileset images, collection tiles and image layers.Changed
renderer.uvOffsetand the undocumentedtextureSeamFixsetting are removed: tiles are no longer drawn a pixel larger on Canvas.Fixed (released bugs)
antiAlias: falseno longer draws smoothed after a resize (the 2D context state is restored).setTile/clearTile(also on WebGL/WebGPU and on tinted Canvas layers).Ellipse, other ellipses become polygons), on top of Project isometric collision shapes with the map's tile ratio #1766.setTexturebetween batched effect sprites; no WebGL error after an effect texture is replaced or destroyed.maxfpsabove 120 no longer stops the game; the camera deadzone sits on whole pixels.Performance
ShaderEffectshare one draw call, even from different atlas frames.Known limits (documented)
linear-mipmap(effects are GLSL 1.00; only visible on effect sprites drawn small from tightly packed atlases).Light3dlights every camera's meshes regardless ofcullMask.The 20.11 changelog section is consolidated (53 entries down to 44, credits kept).
Test plan
pnpm lintpassestmxrasterizer: within 0.71 px on 2:1 maps🤖 Generated with Claude Code
https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx