Moved shaders to new directory

This commit is contained in:
Sascha Willems 2023-05-09 21:03:02 +02:00
parent 0b3f8340e3
commit 99b226237a
1244 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#version 450
struct Particle
{
vec4 pos;
vec4 vel;
};
// Binding 0 : Position storage buffer
layout(std140, binding = 0) buffer Pos
{
Particle particles[ ];
};
layout (local_size_x = 256) in;
layout (binding = 1) uniform UBO
{
float deltaT;
int particleCount;
} ubo;
void main()
{
int index = int(gl_GlobalInvocationID);
vec4 position = particles[index].pos;
vec4 velocity = particles[index].vel;
position += ubo.deltaT * velocity;
particles[index].pos = position;
}