Skip to content

@remotion/web-renderer: Preserve transforms for precomposited filters - #9913

Merged
JonnyBurger merged 2 commits into
mainfrom
codex/reproduce-web-renderer-9901
Jul 30, 2026
Merged

@remotion/web-renderer: Preserve transforms for precomposited filters#9913
JonnyBurger merged 2 commits into
mainfrom
codex/reproduce-web-renderer-9901

Conversation

@JonnyBurger

@JonnyBurger JonnyBurger commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

  • add a minimal rotated drop-shadow() reproduction for Skills2Gesture does not client-side render well #9901
  • preserve the original 2D affine transform when drawing a precomposited filter layer instead of stretching it into an axis-aligned bounding box
  • keep the existing WebGL path for 3D precomposition unchanged

Testing

Closes #9901

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview Jul 30, 2026 8:18am
remotion Ready Ready Preview Jul 30, 2026 8:18am

Request Review

@JonnyBurger JonnyBurger changed the title Internal: Add web renderer reproduction for issue 9901 @remotion/web-renderer: Preserve transforms for precomposited filters Jul 30, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — a reproduction test for issue #9901 (rotated drop-shadow() not preserving rotation during client-side precomposition), consisting of a new fixture, test, and Root.tsx registration.

  • Fixture — A minimal 800x500 composition with a #edf7ff pill rotated 30deg and carrying a drop-shadow() filter. No React import, consistent with nearby zero-import fixtures like inside-3d-transform.tsx.
  • Test — Renders the fixture via renderStillOnWeb, draws the PNG blob onto an OffscreenCanvas, and asserts a single pixel (200, 80) equals the pill background color [237, 247, 255, 255]. That coordinate lies inside the correctly-rotated pill but outside its axis-aligned bounding box, so this fails on all browsers until the precomposition bug is fixed.
  • Root.tsx registration — Placed beside the related issue7199ScaleAndDropShadow composition.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes (delta since 293a98c) — the core fix in process-node.ts that preserves 2D affine transforms when drawing precomposited filter layers.

  • process-node.ts — When the precomposited layer is 2D (not needing WebGL), applies totalMatrix via setTransform on the canvas instead of resetting to identity. Uses precomposeRect as the draw destination (since the canvas transform handles positioning) and sets parentOffsetScale to 1 (since setTransform already incorporates scale). The 3D path keeps the existing behavior unchanged.
  • The issue-7199 regression test (scale + drop-shadow) should remain unaffected — for pure scale, the canvas transform + precomposeRect produces the same screen-space result as the old identity transform + rectAfterTransforms.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

@JonnyBurger
JonnyBurger merged commit eb356a3 into main Jul 30, 2026
20 checks passed
@JonnyBurger
JonnyBurger deleted the codex/reproduce-web-renderer-9901 branch July 30, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skills2Gesture does not client-side render well

1 participant