properly automatically importing a shader of any type

This commit is contained in:
2023-12-23 13:11:20 -05:00
parent a6caf232d9
commit 0029f39840
6 changed files with 162 additions and 367 deletions

21
src/shaders/tri.comp Normal file
View File

@ -0,0 +1,21 @@
#version 450
#extension GL_ARB_separate_shader_objects: enable
struct Particle {
vec2 position;
vec2 velocity;
vec4 color;
}
layout (std140, binding = 1) readonly buffer ParticleSSBOIn {
Particle particlesIn[ ];
};
layout (std140, binding = 2) buffer ParticleSSBOOut {
Particle particlesOut[ ];
};
void main() {
particlesOut[index].position = particlesIn[index].position + particlesIn[index].velocity.xy * ubo.deltaTime;
}