Skip to content

Commit

Permalink
FIx modulate
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero committed Oct 7, 2022
1 parent db70275 commit a0e93c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,10 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
color0.src_color_blend_factor = BlendFactor::kOne;
break;
case BlendMode::kModulate:
// kSourceColor and kDestinationColor override the alpha blend factor.
color0.dst_alpha_blend_factor = BlendFactor::kZero;
color0.dst_color_blend_factor = BlendFactor::kSourceColor;
color0.src_alpha_blend_factor = BlendFactor::kZero;
color0.src_color_blend_factor = BlendFactor::kZero;
color0.dst_alpha_blend_factor = BlendFactor::kOneMinusSourceAlpha;
color0.dst_color_blend_factor = BlendFactor::kOneMinusSourceAlpha;
color0.src_alpha_blend_factor = BlendFactor::kOne;
color0.src_color_blend_factor = BlendFactor::kDestinationColor;
break;
default:
FML_UNREACHABLE();
Expand Down
1 change: 0 additions & 1 deletion impeller/entity/shaders/blending/advanced_blend.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ void main() {
vec4 blended = vec4(Blend(dst.rgb, src.rgb), 1) * dst.a;

frag_color = mix(dst_sample, blended, src.a);
//frag_color = dst_sample;
}

0 comments on commit a0e93c8

Please sign in to comment.