Code cleanup, refactoring and simplification
This commit is contained in:
parent
0888d1c9b0
commit
47c3bd16c4
16 changed files with 500 additions and 901 deletions
|
|
@ -6,7 +6,7 @@ layout (location = 1) in vec2 inUV;
|
|||
struct Instance
|
||||
{
|
||||
mat4 model;
|
||||
vec4 arrayIndex;
|
||||
float arrayIndex;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO
|
||||
|
|
@ -20,7 +20,7 @@ layout (location = 0) out vec3 outUV;
|
|||
|
||||
void main()
|
||||
{
|
||||
outUV = vec3(inUV, ubo.instance[gl_InstanceIndex].arrayIndex.x);
|
||||
outUV = vec3(inUV, ubo.instance[gl_InstanceIndex].arrayIndex);
|
||||
mat4 modelView = ubo.view * ubo.instance[gl_InstanceIndex].model;
|
||||
gl_Position = ubo.projection * modelView * vec4(inPos, 1.0);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue