Join GitHub today
Apply opacity bindings in vertex shader, rather than CPU. #3257
Previously, opacity bindings were calculated on the CPU and
This complicates primitive interning, where we want to be able
Instead, provide the opacity for rectangles and images as part
This will simplify porting rectangles and images to use
Shaders aren't building any more: https://tools.taskcluster.net/groups/WwadJX38Sx6vDksws5nnPw/tasks/BnVdw5MNQqqmoYeFWJwL4Q/runs/0/logs/public%2Flogs%2Flive.log#L2145
Have one concern, plus red CI
float opacity = user_data.z / 65535.0; image_data.color *= opacity;
Doesn't this imply
PremultipliedAlpha blending? What if a different mode is used?
Pushed a fix for blend modes in image shader. Good catch!
As a follow up, we should port all the batching code that uses an image shader to use a common function for getting the batch params, and add a wrench test for images with alpha blend mode (I'll open issues for these).
New try run looks good. Just need a review of the follow up commit that fixes the blend mode case in the image shader. The only failure is a 1/255 pixel difference in a couple of tests, but these are also fuzzy in D2D, so we can just mark them as fuzzy.