From bd414285c4e95dd666f4ab5058b5f2ef993c5699 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 26 Nov 2024 03:15:12 -0800 Subject: Interleaved gradient noise is now parameterized by frame count I'm using an AAP (vrc.school/docs/Other/AAPs/) to create a frame counter. That frame counter then drives this parameter. Thus the sparkly pattern won't turn into gross flashing when the framerate is low. Also add a speed parameter to control IGN. --- atrix256.cginc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'atrix256.cginc') diff --git a/atrix256.cginc b/atrix256.cginc index 3eb164c..ccdc750 100644 --- a/atrix256.cginc +++ b/atrix256.cginc @@ -33,8 +33,8 @@ float ign(float2 screen_px) { 0.00583715 * screen_px.y, 1), 1); } -float ign_anim(float2 screen_px) { - float frame = frac(_Time[0]*.0005) * 64; +float ign_anim(float2 screen_px, float frame, float speed) { + frame = fmod(frame * speed, 64); return ign(screen_px + frame * 5.588238f); } -- cgit v1.2.3