summaryrefslogtreecommitdiffstats
path: root/atrix256.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-11-26 03:15:12 -0800
committeryum <yum.food.vr@gmail.com>2024-11-26 03:15:12 -0800
commitbd414285c4e95dd666f4ab5058b5f2ef993c5699 (patch)
treeae59ed9fc8d196bf06ff55cc431f40b2b9af8811 /atrix256.cginc
parent625b8130fd394b1af29e1bee43cb236190666ee5 (diff)
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.
Diffstat (limited to 'atrix256.cginc')
-rw-r--r--atrix256.cginc4
1 files changed, 2 insertions, 2 deletions
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);
}