Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing GenImagePerlinNoise() being stretched, if Image is not rectangular #4276

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

Bugsia
Copy link
Contributor

@Bugsia Bugsia commented Aug 23, 2024

I have noticed that when the width and height of GenImagePerlinNoise() are not the same, then the noise will get stretched. So I have added a compensation for it.
Now even if the sides aren´t the same length, the noise won´t get distorted, but rather extended.

Here an image to demonstrate:
On the left is my fix being applied. The noise looks normal.
On the right the current function is being used. The noise is stretched.
fixedPerlinNoise

Fixing GenImagePerlinNoise() being stretched, if Image is not rectangular
@raysan5 raysan5 merged commit 77172e3 into raysan5:master Aug 23, 2024
@raysan5
Copy link
Owner

raysan5 commented Aug 23, 2024

@Bugsia thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants