From 6cb15b3647435fbba41ed09f7f7017f0141de279 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 1 Sep 2012 10:32:55 +0000 Subject: [PATCH] tutorial: add some cosmetic white noise. --- tutorial/03_noise.lolfx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tutorial/03_noise.lolfx b/tutorial/03_noise.lolfx index 871ad20e..861930c8 100644 --- a/tutorial/03_noise.lolfx +++ b/tutorial/03_noise.lolfx @@ -88,7 +88,10 @@ float noise3d(vec3 p) void main(void) { vec2 tmp = pass_Rotation * pass_Position; - float test = tmp.x * tmp.y + 0.75 * sin(3.0 * u_Time); + float test = tmp.x * tmp.y + sin(3.0 * u_Time); + + /* Add some garbage noise */ + test += fract(sin(test * 938.437) * 137.0) / 2.0; vec3 points[4] = (test > 0.0) ? fire : water;