mewwww
This commit is contained in:
parent
e1f41b09ff
commit
398ad2879b
10 changed files with 131 additions and 4 deletions
23
shader.glsl
Normal file
23
shader.glsl
Normal file
|
@ -0,0 +1,23 @@
|
|||
#version 450
|
||||
|
||||
layout(location = 0) in vec2 inPosition;
|
||||
layout(location = 1) in vec3 inColor;
|
||||
layout(location = 2) in uint index;
|
||||
|
||||
layout(set = 0, binding = 0) uniform UBO {
|
||||
mat3 view;
|
||||
mat3 proj;
|
||||
} ubo;
|
||||
|
||||
layout(set = 0, binding = 1) uniform UBO_INST {
|
||||
mat3 model[1000];
|
||||
} ubo_inst;
|
||||
|
||||
layout(location = 0) out vec3 fragColor;
|
||||
layout(location = 1) out vec2 fragUV;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(ubo.proj * ubo.view * ubo_inst.model[index] * vec3(inPosition, 1.0), 1.0);
|
||||
fragColor = inColor;
|
||||
fragUV = inPosition + vec2(0.5, 0.5);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue