Pick the sample closer to the camera when resolving 2x MSAA.

(cherry picked from commit f975cfe037971bc1684d64d31be7be09b31aa093)
This commit is contained in:
Skyth
2026-01-19 13:13:49 +03:00
committed by Thaddeus Crews
parent fbf92d7642
commit 19df5470c8

View File

@@ -112,7 +112,7 @@ void main() {
}
if (params.sample_count == 2) {
best_index = (pos.x & 1) ^ ((pos.y >> 1) & 1); //not much can be done here
best_index = (group1.x < group1.y) ? 1 : 0; // Not much can be done here. Pick the sample closer to the camera.
} else if (params.sample_count == 4) {
vec4 freq = vec4(equal(group1, vec4(group1.x)));
freq += vec4(equal(group1, vec4(group1.y)));