Texture #4

View fullpage shader

Editor

#define PI 3.1415926535

varying vec2 v_uv;

uniform float u_time;
uniform vec2 u_resolution;
uniform vec2 u_mousepos;
uniform sampler2D u_texturemap;

/// https://iquilezles.org/
/// https://www.shadertoy.com/view/Xsl3Dl
vec3 hash( vec3 p )
{
p = vec3(
dot(p, vec3(127.1,311.7, 74.7)),
dot(p, vec3(269.5,183.3,246.1)),
dot(p, vec3(113.5,271.9,124.6))
);

return - 1.0 + 2.0 * fract(sin(p) * 43758.5453123);
}

/// https://iquilezles.org/
/// https://www.shadertoy.com/view/Xsl3Dl
float noise( in vec3 p )
{
vec3 i = floor(p);
vec3 f = fract(p);
vec3 u = f * f * (3.0 - 2.0 * f);

return mix(
mix(
mix(
dot(hash(i + vec3(0.0,0.0,0.0)), f - vec3(0.0,0.0,0.0)),
dot(hash(i + vec3(1.0,0.0,0.0)), f - vec3(1.0,0.0,0.0)),
u.x