I know through some recent extensions (NV_sample_mask_override_coverage) it is possible to overwrite the coverage mask used to ultimately decide which samples get written to by the rasterizer.
What I want to do is is not override the coverage mask, rather I just want to read it and output to an integer texture. It appears gl_SampleMask is output only...
Is it possible through the core API or an extension?
I could manually compute pixel coverage in the fragment shader by doing a bunch of point in triangle tests, but if the hardware can already do this, I would rather not repeat the work...