-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestse: openglengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Milestone
Description
In order to perform advanced blends today, we:
- end the pass,
- store the resolve texture,
- perform the advanced blend via FilterContents, reading the the resolved texture as the backdrop,
- create a new pass,
- draw the previously resolved texture to the new pass,
- draw the blend result to the new pass.
We can avoid this Rube Goldberg machine by taking better advantage of hardware/API features:
- For OpenGL, advanced blends can be performed using builtin pipeline blend modes. OpenGL extension: KHR_blend_equation_advanced

-
For Vulkan, advanced blends can also be performed using builtin pipeline blend modes. Vulkan extension: VK_EXT_blend_operation_advanced. This is obsoleted by the next item.

- For Vulkan devices that don't support the advanced blend equation extension, we can read from the framebuffer by setting up passes.
This is complicated because it requires subcaching VkPipelines with unique subpass variations. - For Metal on iOS, it's also possible to read from the framebuffer and perform the blend as part of the shader inline. I'm not sure this can be done with compiler magic in ImpellerC -- we'll probably need a special compilation path for these in the build system. Completed with: [Impeller] read from framebuffer for advanced blends on iOS. engine#39567
jonahwilliams, chinmaygarde and westy92
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestse: openglengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team