Skip to content
Snippets Groups Projects
Verified Commit bcbb5b44 authored by Josch Morgenstern's avatar Josch Morgenstern
Browse files

[#111] add params in push constant to pressure shader

parent 65d3b726
No related branches found
No related tags found
1 merge request!95Resolve "Wassersimulation mit Interaktion"
......@@ -4,8 +4,6 @@
const float PI = 3.1415926535897932384626433832795;
#include "particle_params.inc"
layout(local_size_x = 256) in;
struct Particle
......@@ -30,7 +28,15 @@ layout(std430, binding = 1) writeonly buffer buffer_outParticle
};
layout( push_constant ) uniform constants{
float deltaTime;
float h;
float mass;
float gasConstant;
float offset;
float gravity;
float viscosity;
float ABSORBTION;
float dt;
vec3 gravityDir;
float particleCount;
};
......@@ -42,6 +48,7 @@ float poly6(float r)
float densitySum = 0.f;
void main() {
uint id = gl_GlobalInvocationID.x;
if(id >= int(particleCount))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment