aboutsummaryrefslogtreecommitdiff
path: root/src/shader/code/stream.glsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-12-18 17:04:18 +0100
committerAdrian Kummerlaender2018-12-18 17:04:18 +0100
commitfed710754296111a51b1b99b40a3c5e5dc873895 (patch)
tree1354a3bca2de3f52dc28bccdd633cfbc71ee5ae8 /src/shader/code/stream.glsl
parent556f6cea377f6e8620d05081946f8b469b8a1339 (diff)
downloadcompustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar
compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.gz
compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.bz2
compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.lz
compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.xz
compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.zst
compustream-fed710754296111a51b1b99b40a3c5e5dc873895.zip
Purify collide shader
i.e. move fluid vertex placement to appropriate vertex shader. Do not amplify or shift fluid moments in any way prior to passing it to the display pipeline.
Diffstat (limited to 'src/shader/code/stream.glsl')
-rw-r--r--src/shader/code/stream.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shader/code/stream.glsl b/src/shader/code/stream.glsl
index 982b207..9b77c85 100644
--- a/src/shader/code/stream.glsl
+++ b/src/shader/code/stream.glsl
@@ -29,6 +29,10 @@ void main() {
const uint x = gl_GlobalInvocationID.x;
const uint y = gl_GlobalInvocationID.y;
+ if ( !(x < nX && y < nY) ) {
+ return;
+ }
+
if ( x != 0 && x != nX-1 && y != 0 && y != nY-1 ) {
for ( int i = -1; i <= 1; ++i ) {
for ( int j = -1; j <= 1; ++j ) {