OneLoneCoder / Javidx9

The official distribution of Javidx9's YouTube videos and projects
http://www.youtube.com/javidx9
Other
2.16k stars 1.29k forks source link

Small bug with Perlin-like noise generator #71

Open ITV-107 opened 2 years ago

ITV-107 commented 2 years ago

At lines 286, in the 2D Perlin noise generator, the Y samples do not rely on the height of the screen, instead using the width instead. Is this deliberate behaviour? Attached is an image of the code in question:

image https://github.com/OneLoneCoder/videos/blob/master/OneLoneCoder_PerlinNoise.cpp

OneLoneCoder commented 2 years ago

Hi! This is deliberate yes, as I assume the generated maps are square, and powers of 2 in dimension.