@remotion/web-renderer: Preserve transforms for precomposited filters - #9913
Conversation
@remotion/web-renderer: Preserve transforms for precomposited filters
There was a problem hiding this comment.
✅ 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
#edf7ffpill rotated 30deg and carrying adrop-shadow()filter. No React import, consistent with nearby zero-import fixtures likeinside-3d-transform.tsx. - Test — Renders the fixture via
renderStillOnWeb, draws the PNG blob onto anOffscreenCanvas, 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
issue7199ScaleAndDropShadowcomposition.
DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
✅ 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
totalMatrixviasetTransformon the canvas instead of resetting to identity. UsesprecomposeRectas the draw destination (since the canvas transform handles positioning) and setsparentOffsetScaleto1(sincesetTransformalready incorporatesscale). 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 +
precomposeRectproduces the same screen-space result as the old identity transform +rectAfterTransforms.
DeepSeek Pro (free via Pullfrog for OSS) (Claude Opus not used — the program covers this model; add its provider key to run your pick) | 𝕏

Summary
drop-shadow()reproduction for Skills2Gesture does not client-side render well #9901Testing
bun run buildbun run stylecheckbun run testwebrenderer(240 test files passed; 672 tests passed and 21 skipped)Closes #9901