mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-13 14:10:57 +00:00
00cade072c
It's a bit flaky for particles, especially at higher frame rates, but that's due to supporting only 64 overlapping pixels. A reasonable solution is probably switching to a priority heap for the "sort" and upping the limit.
20 lines
405 B
C
20 lines
405 B
C
#ifndef OIT_SET
|
|
#define OIT_SET 2
|
|
#endif
|
|
|
|
struct FragData {
|
|
vec4 color;
|
|
float depth;
|
|
int next;
|
|
};
|
|
|
|
layout (set = OIT_SET, binding = 0) coherent buffer FragCount {
|
|
int numFragments;
|
|
int maxFragments;
|
|
};
|
|
|
|
layout (set = OIT_SET, binding = 1) buffer Fragments {
|
|
FragData fragments[];
|
|
};
|
|
|
|
layout (set = OIT_SET, binding = 2, r32i) coherent uniform iimage2D heads;
|