Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1bba3a9

Browse files
committed
fix ratio.
1 parent 490fa46 commit 1bba3a9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

impeller/entity/contents/filters/gaussian_blur_filter_contents.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ fml::StatusOr<RenderTarget> MakeDownsampleSubpass(
361361
Scalar ratio = 0.25;
362362
if (pass_args.effective_scalar.x <= 0.125f) {
363363
edge = 3.0;
364-
ratio = 0.125;
364+
ratio = 0.0625;
365365
}
366366
ContentContext::SubpassCallback subpass_callback =
367367
[&](const ContentContext& renderer, RenderPass& pass) {

impeller/entity/shaders/texture_downsample.frag

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@ frag_info;
1818

1919
in highp vec2 v_texture_coords;
2020

21-
out f16vec4 frag_color;
21+
out vec4 frag_color;
2222

2323
void main() {
24-
f16vec4 total = f16vec4(0.0hf);
25-
float16_t ratio = float16_t(frag_info.ratio);
24+
vec4 total = vec4(0.0);
2625
for (float i = -frag_info.edge; i <= frag_info.edge; i += 2) {
2726
for (float j = -frag_info.edge; j <= frag_info.edge; j += 2) {
2827
total += (texture(texture_sampler,
2928
v_texture_coords + frag_info.pixel_size * vec2(i, j),
3029
float16_t(kDefaultMipBias)) *
31-
ratio);
30+
frag_info.ratio);
3231
}
3332
}
3433
frag_color = total;

0 commit comments

Comments
 (0)