SHARE
TWEET

Graphing Blank

tpfto May 16th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // https://www.shadertoy.com/view/wdSXzm
  2.  
  3. void mainImage( out vec4 fragColor, in vec2 fragCoord )
  4. {
  5.    
  6.     vec2 uv = fragCoord - ceil(0.5 * iResolution.xy);
  7.    
  8.     float x = uv.x, y = uv.y;
  9.        
  10.     vec3 col = vec3(0.992, 0.965, 0.89);
  11.    
  12.     // ======= Lines + Bold lines    
  13.     col = mix(col, vec3(0.576, 0.631, 0.631), step(0.9, fract(0.1 * x)) * 0.1);
  14.     col = mix(col, vec3(0.576, 0.631, 0.631), step(0.98, fract(0.02 * x)) * 0.2);
  15.  
  16.     col = mix(col, vec3(0.576, 0.631, 0.631), step(0.9, fract(0.1 * y)) * 0.1);
  17.     col = mix(col, vec3(0.576, 0.631, 0.631), step(0.98, fract(0.02 * y)) * 0.2);
  18.    
  19.     // ======= AXES
  20.     col = mix(col, vec3(0.345, 0.431, 0.459), step(abs(x), 0.5));
  21.     col = mix(col, vec3(0.345, 0.431, 0.459), step(abs(y), 0.5));
  22.    
  23.     // ======= CENTER
  24.     col = mix(col, vec3(0.933, 0.91, 0.835), (1.0 - step(2.5, abs(x))) * (1.0 - step(2.5, abs(y))));
  25.    
  26.     fragColor = vec4(col, 1.0);
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top