Skip to content

llvmpipe/lavapipe: implement and enable alpha-to-coverage dithering

Aleksi Sapon requested to merge DDoSQc/mesa:lp-alpha-to-coverage-dither into main

What does this MR do and why?

This is a common feature on hardware, both Nvidia and Apple GPUs have it always enabled.

On OpenGL this can be controlled using NV_alpha_to_coverage_dither_control, but as far as I can tell there is no extension on Vulkan. Metal also has this feature without a control.

LLVMpipe also has some decade old code to simulate alpha-to-coverage back when it didn't support multisampling. As far as I can tell, no API lets you use alpha-to-coverage without multisampling, but I made sure that it still works with the dithering. I only had to the change the 0.5 threshold to 0. Anyway I don't think it matters too much...

4x MSAA with quarter steps of ordered dithering, like on Nvidia and Apple hardware. color_opacity_primvar_000

Edited by Aleksi Sapon

Merge request reports

Loading