Fixes possible artifacts with GPU skinning on GL

std140 requires 16 bytes alignment and it makes alignment of uvec2 in
SkinData be equal to 16 bytes instead of 8 bytes.
This commit is contained in:
Vladislav Belov 2026-07-28 18:12:21 +02:00
parent 15b9a39b00
commit b3165505b6
No known key found for this signature in database
GPG key ID: 353545E45DB9CCB3

View file

@ -12,10 +12,10 @@
layout(set = 2, binding = LOCATION, FORMAT) uniform image2D NAME
#if USE_DESCRIPTOR_INDEXING
#define STORAGE_BUFFER(LOCATION) \
layout(set = 2, binding = LOCATION)
layout(std430, set = 2, binding = LOCATION)
#else
#define STORAGE_BUFFER(LOCATION) \
layout(set = 1, binding = LOCATION)
layout(std430, set = 1, binding = LOCATION)
#endif
#else
// We use offset to the binding slot for OpenGL to avoid overlapping with other
@ -23,7 +23,7 @@
#define STORAGE_2D(LOCATION, FORMAT, NAME) \
layout(binding = LOCATION, FORMAT) uniform image2D NAME
#define STORAGE_BUFFER(LOCATION) \
layout(binding = LOCATION)
layout(std430, binding = LOCATION)
#endif
#endif // STAGE_COMPUTE