arjan de lumens said:
So, let me see if I can get this straight: you store 1 color/z per MSAA sample (or sample "centroid" as you call it) the way one would usually do
The centroid is not a sample as such, it's just the sampling point which if covered guarantuees the surface covering it gets a fragment slot (ie. the same as with MSAA, if the sampling point is covered it gets stored ... with plan MSAA you simply have implicit full coverage of the sample footprint).
then try to use the remaining per-pixel space freed by that compression to store "extra" coverage
never said coverage information would only be stored if room was saved by compression, in fact I stated the exact opposite. "which stores conservative fragment coverage information for each MSAA sample"
Threre is compression because each fragment can cover multiple subsamples, but all in all you still need to use a little more storage for the coverage information.
Some pseudo code ...
newFragment arrives :
foreach fragment in fragments HSR($fragment, newFragment)
AddFragment(fragments, newFragment);
CullFragments(fragments, culledFragments);
//add the coverage of culled fragments within subsamples to the coverage of the fragments covering the centroids of those subsamples, we assume they both belong to the same continuously textured object ... might not be right, but we won't be more wrong than with MSAA
foreach fragment in culledFragments foreach subsample in SubsamplesCovered($fragment) AddCoverage(SubsampleOwner($subsample), Coverage($fragment) & SubsampleFootprint($subsample));
I guess you would need yet another extra flag per fragment, to indicate whether it's a pure fragment or a composite fragment ... when a subsample owned by a composite fragment get covered the part of the composite fragment within that subsample's footprint should be added to the new owner, no new fragments should be allowed to be created from applying HSR to composite fragments.