- Home /
Need some shader code translating to ShaderLab. Random float generation.
float random( vec2 p ){
const vec2 r = vec2(23.1406926327792690,2.6651441426902251);
return fract( cos( mod( 123456789., 1e-7 + 256. * dot(p,r))));
}
I still very much learning Shader code and any help would be appreciated. Trying to output some random numbers within the shader to generate some noise for space skyboxes.
Comment
Sadly, apparently not many people know how to code shaders... $$anonymous$$y question about adding a bump map to an existing shader has gone unanswered for days, with plenty of views.
Hmm, not good. However not that surprising. $$anonymous$$aybe I'll try reddit.
Your answer
![](https://koobas.hobune.stream/wayback/20220613105611im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
3D Texture and normals 0 Answers
Noise generation for a custom shape? 0 Answers
Carpet in Shadergraph? 0 Answers
How to instantiate prefabs at random postions in 2d 1 Answer
Perlin Noise Questions 1 Answer