diff options
author | Adrian Kummerlaender | 2018-05-25 19:49:37 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2018-05-25 19:49:37 +0200 |
commit | e516095a425d1c8d5bd9f9004416a6c19bcaf84f (patch) | |
tree | c366ffbec08dff8df561f56f6b967fbd05049815 /src/shader | |
parent | 727645613619e366ae51a2eaad69793c9e225b05 (diff) | |
download | computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.tar computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.tar.gz computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.tar.bz2 computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.tar.lz computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.tar.xz computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.tar.zst computicle-e516095a425d1c8d5bd9f9004416a6c19bcaf84f.zip |
Dynamically build compute shader from field function
Diffstat (limited to 'src/shader')
-rw-r--r-- | src/shader/compute.glsl | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/shader/compute.glsl b/src/shader/compute.glsl index 148157b..eaf5579 100644 --- a/src/shader/compute.glsl +++ b/src/shader/compute.glsl @@ -6,17 +6,10 @@ layout (std430, binding=1) buffer bufferA{ float data[]; }; uniform vec2 world; -// vector field definition - -vec2 f(vec2 v) { - return vec2( - cos(v.x*sin(v.y)), - sin(v.x-v.y) - ); -} - // ODE solver +vec2 f(vec2); // field definition is to be appended + vec2 explicitEuler(float h, vec2 v) { return v + h * f(v); } |