For very simple pseudorandom-looking stuff, I use this oneliner that I found on the internet somewhere:
float rand(vec2 co){ return fract(sin(dot(co, vec2(12.9898, 78.233))) * 43758.5453); }
You can also generate a noise texture using whatever PRNG you like, then upload this in the normal fashion and sample the values in your shader; I can dig up a code sample later if you’d like.
Also, check out this file for GLSL implementations of Perlin and Simplex noise, by Stefan Gustavson.
Related Posts:
- Random number between 0 and 1 in python [duplicate]
- How to randomize Excel rows
- How to use random() in C [duplicate]
- Java: Variable is already defined in method
- Generate unique random numbers between 1 and 100
- What exactly is a VBO in OpenGL?
- Getting random numbers in Java [duplicate]
- How do I generate a random int number?
- How to generate a random number in C++?
- Reasons for using the set.seed function
- Python random function
- What does random.sample() method in python do?
- Random string generation with upper case letters and digits
- rand() between 0 and 1
- Generate random number between two numbers in JavaScript
- Generating a Random Number between 1 and 10 Java
- How do I generate random integers within a specific range in Java?
- How can I randomly select an item from a list?
- Random number between 1 to 10 using C++
- How to generate a random int in C?
- Generating a Random Number between 1 and 10 Java [duplicate]
- How do I generate random integers within a specific range in Java?
- How to get a random number between a float range?
- Generating random whole numbers in JavaScript in a specific range?
- Python: Array v. List
- How to generate random number in Bash?
- srand(time(0)) and random number generation
- What does it mean to normalize a value?
- Generate random string/characters in JavaScript
- PHP random string generator
- How to randomize (shuffle) a JavaScript array?
- Best way to generate a random float in C#
- Random float number generation
- Generate random sentences in python
- Shuffle an array with python, randomize array item order with python
- Random number c++ in some range
- C++, random number w/ range of 1-6
- What is the significance of the number, 32767?
- use np.random.multinomial() in python
- Generate random float between two floats
- Generate random colors (RGB)
- Generate a random double in a range
- possible lossy conversion from long to int?
- Java Generate Random Number Between Two Given Values
- To get a random integer value between 1 and N (inclusive) you can use the following.
- Random shuffling of an array
- Simple Random Samples from a Sql database
- Creating a random string with A-Z and 0-9 in Java
- Weighted random selection from array
- Get a random item from a JavaScript array
- Get a random sample with replacement
- generate random double numbers in c++
- How to transparent Unity3D custom shader?
- Creating random numbers with no duplicates
- How do I create a random alpha-numeric string in C++?
- Generate a random double in a range
- Sample random rows in dataframe
- Is there a simple way to make a random selection from an array in JavaScript or any other programming language?
- Seeding the random number generator in Javascript
- Problems Generating A Math.random Number, Either 0 or 1
- How to randomly get 0 or 1 every time?
- Produce a random number in a range using C#
- Fastest way to generate a random boolean
- Java generating non-repeating random numbers
- Simple Coin Toss using random class in Java. The do while loop doesn’t seem to generate random results
- IllegalArgumentException: Bound must be positive
- Simple way to create matrix of random numbers
- How to use random in BATCH script?
- Generating a Random Number for HTML
- Getting a random value from a JavaScript array
- C++ Simple Dice roll – how to return multiple different random numbers [duplicate]
- Generate a random letter in Python
- Random word generator- Python
- How can I generate random alphanumeric strings?
- Weighted random numbers
- Best way to randomize an array with .NET
- Shuffle an array with python, randomize array item order with python
- WordPress – Display Random Number Between 190-250