When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}| // | |
| // GLSL textureless classic 3D noise "cnoise", | |
| // with an RSL-style periodic variant "pnoise". | |
| // Author: Stefan Gustavson (stefan.gustavson@liu.se) | |
| // Version: 2011-10-11 | |
| // | |
| // Many thanks to Ian McEwan of Ashima Arts for the | |
| // ideas for permutation and gradient selection. | |
| // | |
| // Copyright (c) 2011 Stefan Gustavson. All rights reserved. |
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);