remove memory fetch of vertex shader

This commit is contained in:
2025-11-16 11:56:07 +01:00
parent 21dcfd1d9d
commit 2f63ff0f5e
2 changed files with 16 additions and 31 deletions

View File

@@ -1,18 +1,11 @@
#version 460 core
layout(std430, binding = 3) buffer layoutName
{
float data_SSBO[];
};
layout(location = 0) uniform mat4 viewMatrix;
layout(location = 1) uniform mat4 projectionMatrix;
vec3 unpack(uint index) {
return vec3(data_SSBO[index * 3], data_SSBO[index * 3 + 1], data_SSBO[index * 3 + 2]);
}
layout(location = 0) in vec3 position;
void main()
{
gl_Position = projectionMatrix * viewMatrix * vec4(unpack(gl_InstanceID), 1.0);
gl_Position = projectionMatrix * viewMatrix * vec4(position, 1.0);
}