Make realtime shader movement appear at intervals but update as if in realtime?
I have a script to scroll a texture: using System.Collections; using System.Collections.Generic; using UnityEngine;
public class CloudsScroll : MonoBehaviour {
public float ScrollX = 0.5f;
public float ScrollY = 0.5f;
void Update () {
float OffsetX = Time.time * ScrollX;
float OffsetY = Time.time * ScrollY;
GetComponent<Renderer> ().material.mainTextureOffset = new Vector2 (OffsetX, OffsetY);
}
}
It works great, but I'd like the motion to appear as if the framerate was 15fps instead of 60fps. I still want the scrolling to move inbetween visual graphical updates, so technically the texture would move the exact same distance in the same time, there would just be less updates to the refresh so it would appear "jerky" or stuttery. Is this possible to do with this code?
Your answer
![](https://koobas.hobune.stream/wayback/20220612150154im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Something wrong with the cut out feature of the standard shader? 0 Answers
Change Color Of Texture Through Shader At Level Start and Save To Memory To Stop Shader Use 0 Answers
Just Cause 3 Volumetric Explosions 1 Answer
Is there any way to make a custom written shader with hdrp? 0 Answers
How to enhance 3D graphics in Unity for mobile devices? 0 Answers