I hereby claim:
- I am solsarratea on github.
- I am solquemal (https://keybase.io/solquemal) on keybase.
- I have a public key whose fingerprint is 6E92 AEA9 7DE1 C2C8 637C 4C5D 146F 9FE5 80BB 0E46
To claim this, I am signing this object:
/* LIVECODING AND CHILL : bu3namigue con Pablito Labarta y Sol Sarratea | |
Para aprender más sobre shaders: | |
- Book of Shaders https://thebookofshaders.com/ | |
- Curso introductorio https://curso.solquemal.com/ | |
- Shaders + Caos (curso en proceso) https://wikicaos.solquemal.com/ | |
El siguiente código corre en The Force, editor online de GLSL creado por Shawn Lawson | |
Link: https://shawnlawson.github.io/The_Force/ |
// Copy following code at: https://thebookofshaders.com/edit.php | |
// Author: sol sarratea | |
// Title: DCT exploration | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; |
I hereby claim:
To claim this, I am signing this object:
Open image in GIMP editor:
.bmp
Export
+ Advance Options
Export
ready :)
// REACCCION DIFUSION | |
// adaptacion a The Force | |
// shader creado por Keijiro | |
// https://github.com/keijiro/ShaderSketches/blob/master/Fragment/ReactDiffuse.glsl | |
float rand2(vec2 p) | |
{ | |
return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); | |
} |
float r21 (vec2 p) { | |
p = fract(p*vec2(233.34,851.79)); | |
p += dot(p,p+23.34); | |
return fract(p.x*p.y); | |
} | |
vec2 r22 (vec2 p) { | |
float n = r21(p); | |
return vec2(n,r21(p+n)); | |
} |
//Repeticiones en el espacio | |
// Funciones sacadas http://mercury.sexy/hg_sdf/ | |
// Rota alrededor de un eje | |
void pR(inout vec2 p, float a) { | |
p = cos(a)*p + sin(a)*vec2(p.y, -p.x); | |
} | |
// Repite en 3D | |
vec3 pMod3(inout vec3 p, vec3 size) { |
vec3 cosPalette(float t){ | |
vec3 a = vec3(0.5,0.5,0.25); | |
vec3 b = vec3(0.3,0.4,0.4); | |
vec3 c = vec3(2.,1.,3.); | |
vec3 d = vec3(0.,0.3,0.6); | |
return a + b*cos( 6.28318*(c*t+d)); | |
} | |
const int iterations = 120; |
float smallNumber = 0.01; | |
float scene(vec3 p){ | |
vec3 q = fract(p) *4. -1.; | |
float sphere = length(p)-abs(sin(time*0.1)*2.); | |
float planeDist =p.y +2.; | |
vec3 cosPalette(float t){ | |
vec3 a = vec3(0.6,0.5,0.25); | |
vec3 b = vec3(0.5,0.5,0.4); | |
vec3 c = vec3(.2,.3,1.); | |
vec3 d = vec3(.2,0.3,0.32); | |
return a + b*cos( 6.28318*(c*t+d)); | |
} | |
void pMod3(inout vec3 p, vec3 size) { |