diff --git a/data/shader/flame.gsh b/data/shader/flame.gsh index fe4cd44..53a61ce 100644 --- a/data/shader/flame.gsh +++ b/data/shader/flame.gsh @@ -3,6 +3,7 @@ uniform mat4 viewProjectionMatrix; uniform float time; uniform bool bottom; +uniform bool left; layout(points) in; layout(triangle_strip, max_vertices = 256) out; @@ -14,7 +15,7 @@ const float sin_p2 = 2; const float ex_p1 = 1.093; const float ex_p2 = 1.9996; const float begin = 0; -const float end = 2.3; +const float end = 2.5; float radiusFunction(float x) { if (x < transition_point) { @@ -38,14 +39,21 @@ void main() { i = (end-begin)/2.0; render_end = end; } - for (i; isetUniform("viewProjectionMatrix", lightingViewProjectionMatrix); flameShader->setUniform("time", (float) time); flameShader->setUniform("bottom", true); + flameShader->setUniform("left", true); + flame_positions->render(); + flameShader->setUniform("left", false); flame_positions->render(); flameShader->setUniform("bottom", false); + flameShader->setUniform("left", true); + flame_positions->render(); + flameShader->setUniform("left", false); flame_positions->render(); glDisable(GL_CULL_FACE);