properly automatically importing a shader of any type
This commit is contained in:
21
src/shaders/tri.comp
Normal file
21
src/shaders/tri.comp
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user