- Home /
Question by
kalledk21 · Jul 30, 2016 at 10:26 AM ·
texture2dgenerationmathfperlin noiseclouds
Cloud texture generation not working
So, i am generating a texture2d which should just contain a cloud texture, however, only the number 0.4652731 is outputted, am i missing something obvious?
public float cloudVal (int depth, int x, int y, bool shouldOutput)
{
float temp = 0;
for (int d = 0; d < depth; d++)
{
temp += Mathf.PerlinNoise(x + (20 * d * d), y + (35 * d * d));
if (shouldOutput)
{
Debug.Log(x + " " + y);
}
}
temp /= depth;
if (shouldOutput)
{
Debug.Log(temp);
}
return temp;
}
All of my variables seem to be fed correctly into the function, so i don't understand where the problem lies, if not here. If you ask, I'll put up the entire script
Thank you in advance!
Comment
Your answer
Follow this Question
Related Questions
Strange texture2d behaviour 0 Answers
Terrain help 0 Answers
Can anyone explain this code? 1 Answer
Generate a low poly water chunk on a (proceduraly) generated land mass 0 Answers
How to smooth out the values? 1 Answer