Skip to content

fix: draw clip filters in the preview as the render applies them - #265

Open
dazzatronus wants to merge 1 commit into
mainfrom
fix/clip-filters-in-preview
Open

dazzatronus wants to merge 1 commit into
mainfrom
fix/clip-filters-in-preview

Conversation

@dazzatronus

Copy link
Copy Markdown
Contributor

Studio drew a clip with filter set as if it were unset, so previews, share links and shotstack inspect sheets differed from the render.

  • The colour filters (boost, contrast, darken, greyscale, lighten, muted, negative) share one shader that ports the render's per-pixel maths on unpremultiplied colour. ColorMatrixFilter can't: saturation pivots on HSP brightness, so a linear matrix greys pure red to 76 where the render gives 139.
  • blur is pixi's BlurFilter with edges repeated, like the render's clamped box blur. Blur strength is now set as each frame draws, so a capture, which resets the editor zoom to 1:1, blurs like the render. The zoom transition's blur read the same stale on-screen zoom and is fixed with it.
  • Clips the render plays as video (video, html5, rich captions, image-to-video, animated rich text) stay unfiltered, as they render today.
  • The filter runs before the wipe transition, the render's order.

Verify: shotstack inspect a 3×3 grid of one image under each filter, against inspect of its render at 1 s. Every tile's mean colour lands within 3 levels of the render's, and the blur radius matches (3 px at scale 0.32).

Risk: the WebGPU shader compiles under a WGSL validator but hasn't drawn a frame; Studio initialises WebGL.

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.

1 participant