dilevin / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
2 stars 5 forks source link

How to generate permutations of an array in GLSL #52

Closed AditMeh closed 8 months ago

AditMeh commented 8 months ago
Screenshot 2023-10-30 at 10 30 05 PM

To generate the perlin noise, I need a permutation of numbers from 0 to n-1. I can make a vector of numbers from 0 to n-1, but I am not sure how to shuffle it.

AditMeh commented 8 months ago

Never mind, you can just cache and use this one:

https://www.wikiwand.com/en/Perlin_noise#Permutation