ODOShader

ODOS丨More Truchet

by ERIN.Z, 2022-02-11


Snipaste_2022-02-11_14-51-24.png

More Tiles

types 添加更多可平铺的tile:

define s(v,r,sc) smoothstep(r+ sc*5./iResolution.y,r, v)

//2 arc
m = s(abs(length(gv-0.5)-0.5),w,scale)+s(abs(length(gv+0.5)-0.5),w,scale);

2arc //1 arc m = s(abs(length(gv-0.5)-0.5),w,scale)+ s(length(gv+vec2(0,.5)),w,scale)+s(length(gv+vec2(.5,0)),w,scale); 1arc //1 line m = s(abs(gv.x),w,scale)+s(length(abs(gv)-vec2(.5,0)),w,scale); 1line //t line m = s(gv.x,w,scale)-s(length(abs(gv)-vec2(.5)),2.w,scale)+s(length(gv+vec2(-.5,0)),w,scale); tline //+ line m = 1.-s(length(abs(gv)-vec2(.5)),2.w,scale); +line //4pt m = s(length(abs(gv)-vec2(0,.5)),w,scale)+s(length(abs(gv)-vec2(.5,0)),w,scale); 4pt 生成2维hash,一个分量控制旋转,一个分量控制类型。 vec2 n = hash(floor(uv1)); gv = rotate(gv,floor(n.x4.)1.5708);//n.x - random dirction int ty = int(floor(n.y*6.));//n.y - random tile

by ERIN.Z

2024 © typecho & elise