I'm currently working on an hologram shader with random time glitch effect. The thing is, I have the glitch effect appearing but everytime at the same time :/ Any help would be greatly appreciated ! Thanks.
Last edited by ePiQue on Wed Dec 06, 2017 4:02 pm, edited 2 times in total.
Hello ePiQue, thank you for getting in touch and for your support!
Unfortunately, it's not possible to generate random values within a shader, but there are a few solutions you may use to bypass this limitation.
You may generate random numbers via script and pass them to the shader through global variables, please check our Smear sample which makes use of that feature at AmplifyShaderEditor/Examples/Official/Smear.
To give a feeling of randomness, it's common to use the vertices object or world position with time to drive a series of basic wave functions like Sin and Cos, the Bubble sample at AmplifyShaderEditor/Examples/Official/ReflectRefractSoapBubble is a suitable example.
Lastly, take a look at our Noise Generator node, even though it's a bit expensive it can also be useful for this use.
Please let us know if this information helped you out, thanks!
Not a problem, happy that the provided information was useful!
Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.
Every bit helps, your feedback is extremely valuable to us!
If you have any further questions don't hesitate to get back in touch, thanks!