aboutsummaryrefslogtreecommitdiff
path: root/src/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader')
-rw-r--r--src/shader/code/collide.glsl2
-rw-r--r--src/shader/code/geometry.glsl8
-rw-r--r--src/shader/code/vertex.glsl2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/shader/code/collide.glsl b/src/shader/code/collide.glsl
index 936ca89..3982ad8 100644
--- a/src/shader/code/collide.glsl
+++ b/src/shader/code/collide.glsl
@@ -13,7 +13,7 @@ uniform uint nY;
const uint q = 9;
const float omega = 0.6;
-const float displayAmplifier = 50.;
+const float displayAmplifier = 1000.;
float get(uint x, uint y, int i, int j) {
return collideCells[q*nX*y + q*x + (i+1)*3 + j+1];
diff --git a/src/shader/code/geometry.glsl b/src/shader/code/geometry.glsl
index 6701b41..6ecfc99 100644
--- a/src/shader/code/geometry.glsl
+++ b/src/shader/code/geometry.glsl
@@ -30,8 +30,10 @@ void emitSquareAt(vec4 position) {
}
void main() {
- color = gs_in[0].color;
- emitSquareAt(gl_in[0].gl_Position);
- EndPrimitive();
+ if ( gl_in[0].gl_Position.xyz != vec3(0.,0.,0.) ) {
+ color = gs_in[0].color;
+ emitSquareAt(gl_in[0].gl_Position);
+ EndPrimitive();
+ }
}
)";
diff --git a/src/shader/code/vertex.glsl b/src/shader/code/vertex.glsl
index 0727708..453b6fa 100644
--- a/src/shader/code/vertex.glsl
+++ b/src/shader/code/vertex.glsl
@@ -4,7 +4,7 @@ static const std::string VERTEX_SHADER_CODE = R"(
layout (location=0) in vec3 VertexPosition;
out VS_OUT {
- vec3 color;
+ vec3 color;
} vs_out;
void main() {