Jarvis, Optimise my shit
This commit is contained in:
parent
d1abde919d
commit
9424b29d0a
50 changed files with 1469 additions and 1232 deletions
|
|
@ -2,19 +2,8 @@
|
|||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
struct DrawCommand {
|
||||
uint vertexCount;
|
||||
uint instanceCount;
|
||||
uint firstVertex;
|
||||
uint firstInstance;
|
||||
};
|
||||
|
||||
layout(std430, binding = 0) buffer DrawCommands {
|
||||
DrawCommand drawCmds[];
|
||||
};
|
||||
|
||||
layout(std430, binding = 1) buffer Counters {
|
||||
uint faceCount;
|
||||
layout(std430, binding = 0) buffer Counters {
|
||||
uint faceCount[];
|
||||
} counters;
|
||||
|
||||
layout(push_constant) uniform ChunkInfo {
|
||||
|
|
@ -22,17 +11,11 @@ layout(push_constant) uniform ChunkInfo {
|
|||
int slot;
|
||||
uint faceOffset;
|
||||
uint voxelTypeCount;
|
||||
uint indirectCommandIndex;
|
||||
uint biomeCount;
|
||||
uint structureCount;
|
||||
uint worldSeed;
|
||||
};
|
||||
|
||||
void main() {
|
||||
drawCmds[indirectCommandIndex].vertexCount = 0u;
|
||||
drawCmds[indirectCommandIndex].instanceCount = 1u;
|
||||
drawCmds[indirectCommandIndex].firstVertex = faceOffset * 6u;
|
||||
drawCmds[indirectCommandIndex].firstInstance = 0u;
|
||||
|
||||
counters.faceCount = 0u;
|
||||
counters.faceCount[slot] = 0u;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue