Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions impeller/entity/shaders/gaussian_blur/gaussian_blur.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ void main() {
f16vec4 total_color = f16vec4(0.0hf);
float16_t gaussian_integral = 0.0hf;

// Step by 2.0 as a performance optimization, relying on bilinear filtering in
// the sampler to blend the texels. Typically the space between pixels is
// calculated so their blended amounts match the gaussian coefficients. This
// just uses 0.5 as an optimization until the gaussian coefficients are
// calculated and passed in from the cpu.
for (float16_t i = -blur_info.blur_radius; i <= blur_info.blur_radius;
i += 2.0hf) {
// Use the 32 bit Gaussian function because the 16 bit variation results in
Expand Down