Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3407094
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:42:31+00:00 2026-05-18T05:42:31+00:00

As the GPU driver vendors don’t usually bother to implement noiseX in GLSL, I’m

  • 0

As the GPU driver vendors don’t usually bother to implement noiseX in GLSL, I’m looking for a “graphics randomization swiss army knife” utility function set, preferably optimised to use within GPU shaders. I prefer GLSL, but code any language will do for me, I’m ok with translating it on my own to GLSL.

Specifically, I’d expect:

a) Pseudo-random functions – N-dimensional, uniform distribution over [-1,1] or over [0,1], calculated from M-dimensional seed (ideally being any value, but I’m OK with having the seed restrained to, say, 0..1 for uniform result distribution). Something like:

float random  (T seed);
vec2  random2 (T seed);
vec3  random3 (T seed);
vec4  random4 (T seed);
// T being either float, vec2, vec3, vec4 - ideally.

b) Continous noise like Perlin Noise – again, N-dimensional, +- uniform distribution, with constrained set of values and, well, looking good (some options to configure the appearance like Perlin levels could be useful too). I’d expect signatures like:

float noise  (T coord, TT seed);
vec2  noise2 (T coord, TT seed);
// ...

I’m not very much into random number generation theory, so I’d most eagerly go for a pre-made solution, but I’d also appreciate answers like “here’s a very good, efficient 1D rand(), and let me explain you how to make a good N-dimensional rand() on top of it…” .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:42:32+00:00Added an answer on May 18, 2026 at 5:42 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was sending vertex arrays (of 32 bit floats) to the GPU every time
I have a large array (say 512K elements), GPU resident, where only a small
Is there any way to allocate memory on host, that is accessible directly from
Consider this the complete form of the question in the title: Since OpenCL may
What would happen if there are four concurrent CUDA Applications competing for resources in
Any application I create in the RTM version of the Windows Phone 7 tools
For example if I draw a cube and turn my character around so as
We have to compress a ton o' (monochrome) image data and move it quickly.
Is anybody aware of a possibility to use C# libraries like OpenTK (http://www.opentk.com/) from
Some of the concepts and designs of the SIMT architecture are still unclear to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.