Repository navigation
Conversation
theashraf
force-pushed
the
anisotropic-blur
branch
from
October 10, 2026 05:33
dedfbd1 to
8c885d6
Compare
`FilterPrimitive::GaussianBlur` now takes a standard deviation per axis (`std_deviation_x`, `std_deviation_y`), matching SVG's two-value `stdDeviation`. A zero deviation leaves that axis untouched. Each axis gets its own decimation plan and kernel. The finest decimation levels are shared between the axes; once the smaller axis runs out of levels only the larger one keeps being halved. `DecimationSizer` tracks the axes separately through `downscale_axes` / `upscale_axes`. The CPU path gains single-axis downscale/upscale and skips the convolution pass of an identity kernel. The GPU path adds `DOWNSCALE_X/Y` and `UPSCALE_X/Y` passes, carries a second kernel in the filter data (filter size 48 -> 64 bytes) and packs the y-axis decimation count and tap count into the header. Transforms scale the deviations through the covariance of the Gaussian, so a 90 degree rotation swaps the axes and a non-uniform scale scales each axis on its own. Uniform blurs keep the previous averaged scale.
theashraf
force-pushed
the
anisotropic-blur
branch
from
October 10, 2026 06:16
8c885d6 to
78e61f1
Compare
This branch has not been deployed
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.
FilterPrimitive::GaussianBlurnow takes a standard deviation per axis (std_deviation_x,std_deviation_y), matching SVG's two-valuestdDeviation. Equal values behave exactly as before; a zero deviation leaves that axis untouched. This resolves the two TODOs infilter_effects.rsandtransform_blur_params.Approach
GaussianBlurcarries a decimation count and kernel per axis. The finest decimation levels are shared between the axes; once the smaller axis runs out of levels only the larger one keeps being halved (decimation_levels).DecimationSizertracks the axes separately throughdownscale_axes/upscale_axes.DOWNSCALE_X/YandUPSCALE_X/Ypasses;downscale/upscaleinscale.wesltake an axis mask. The filter data grows from 48 to 64 bytes to carry a second kernel, and the header packs the y-axis decimation and tap counts in the previously reserved bits. Drop shadows still blur both axes with one kernel, so their layout is unchanged.Tests
filter_gaussian_blur_horizontal,_vertical,_anisotropic,_anisotropic_rotated,_anisotropic_scaled. Existing snapshots are unchanged.Breaking changes
FilterPrimitive::GaussianBlur { std_deviation }is now{ std_deviation_x, std_deviation_y }, andGaussianBlur::newtakes both deviations.