Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
js
textures
README.md
app.js
index.html

README.md

day 012


No Interactions for this one
[project link](http://caiyuli.com/projects/xDaysOfMaking/d012/)

three.js, GLSL

欢极娇无力,玉软花欹坠。

A supple blossom, coupled with utter elation
## learned today Feb 12th 2017

Practicing shaping, textiles and rotating function in GLSL language after the shader studio class by Patricio Gonzalez Vivo

Main Functions in this code

  • play around with fracting the coordinate to get grids
  • play around with translation and rotation by manipulating the st_f coordinate
  • play around with time control, so the color gets a full change in one cycle of the sin section

float t = u_time * 2. * PI;
st_f = (mod(floor(t*.2),2.)* mod(st_i.y,2.)* rotate(vec2(st_f.x+0.25,st_f.y-0.5),-PI/4.)+mod(ceil(t*.2),2.)* mod(st_i.x,2.)* rotate(vec2(st_f.x-.5,st_f.y+.25),PI/4.));
float change = .3 * sin(t);
vec3 color = vec3(0.935*(1.-sin(2.* t)* .3),0.263*(1.-sin(2.* t)* .3),0.652*(1.-sin(2.* t)* .3));
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.