Replace uniform with storage buffer for instances
Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode@xyz>
This commit is contained in:
@@ -6,8 +6,6 @@ layout(push_constant) uniform pc {
|
||||
mat4 proj;
|
||||
} ubo;
|
||||
|
||||
#define MAX_INSTANCES 1024
|
||||
|
||||
struct InstanceData
|
||||
{
|
||||
vec3 pos;
|
||||
@@ -16,8 +14,8 @@ struct InstanceData
|
||||
uint texture_id;
|
||||
};
|
||||
|
||||
layout(binding = 0) uniform InstanceUniformBuffer {
|
||||
InstanceData instances[MAX_INSTANCES];
|
||||
layout(set=0, binding = 0, std430) readonly buffer InstanceBuffer {
|
||||
InstanceData instances[];
|
||||
};
|
||||
|
||||
layout(location = 0) in vec3 inPosition;
|
||||
|
||||
Reference in New Issue
Block a user