[vulkan] Correct OIT sorting

The reversed depth buffer is very nice, but it also reversed the OIT
blending. Too much demo watching not enough walking around in the maps
(especially start near the episode 4 gate).
This commit is contained in:
Bill Currie 2023-08-04 14:51:49 +09:00
parent 6fe127dd0b
commit 7537cb8d1c

View file

@ -19,7 +19,7 @@ BlendFrags (vec4 color)
for (int i = 1; i < numFrags; i++) {
FragData toInsert = frags[i];
int j = i;
while (j > 0 && toInsert.depth > frags[j - 1].depth) {
while (j > 0 && toInsert.depth < frags[j - 1].depth) {
frags[j] = frags[j - 1];
j--;
}