HLSL Question - Random numbers?
Hey all,
Just a quickie here: Is it possible to generate a random number inside a shader? I can't seem to find any intrinsic function to do this and I obviously can't set an outside value because that'll set it for the entire pass and not on a per vertex / pixel value.
Thanks.
Quote:
I obviously can't set an outside value because that'll set it for the entire pass and not on a per vertex / pixel value.
You could (obviously :-) sent an array of outside values.
Furthermore, a small RNG is not so hard to write so might as well include one in your HLSL file.
Greetz,
Illco
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement