You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filters on layers: draw.push_effects(dc, bounds, Layer_Effects{alpha, filters, blend}) (then pop_layer). Filter / Filter_Kind / Color_Matrix; constructors filter_blur, filter_drop_shadow, filter_brightness, filter_contrast, filter_grayscale, filter_sepia, filter_saturate, filter_hue_rotate, filter_invert, filter_opacity, filter_matrix; filter_is_identity, filters_outset. Chains run as GPU passes
(render/filter.hlsl): color matrices fused (up to 8, clamped between), separable gaussian blur with bilinear tap
pairs and power-of-two reductions above render.set_blur_sigma_limit, drop shadows. Colors are filtered in sRGB as
browsers do.
Blend modes: Blend_Mode (the 16 modes of CSS Compositing 1, plus Plus_Darker / Plus_Lighter) on Layer_Effects.blend; the composite reads a copy of what lies under it (render.FLAG_BLEND, Batch.backdrop).
tests/effects: pixel tests of every filter and blend mode against the specifications' formulas, blur energy /
symmetry / profile (full resolution and reduced), drop shadows, ellipse and polygon clip coverage, backdrops,
target reuse.
examples/effects (build.bat effects): demo, --stress=N, --bench=N. Screenshot in docs/screenshots.
Changed
Frames run their steps in recording order (layers are no longer drawn before the frame): frame_submit(r, Frame_Data) replaces the positional arguments; Batch gains backdrop and op; Layer.done is gone.
Inside a layer the clip stack restarts at the layer's rect; the clip shapes around it cut its composite.
Pooled targets are handed back as soon as their last reader is recorded: a frame with many layers uses a few
textures.
Clip_Data is 80 bytes (kind, first, count, flags); CLIP_CIRCLE moved from parent to flags.