![見出し画像](https://assets.st-note.com/production/uploads/images/83760071/rectangle_large_type_2_f682741841fbbf124c9f347a7dca765b.png?width=800)
🎡ものすごく短くてシンプルなGLSLサンプル sinとlengthの組み合わせ
![](https://assets.st-note.com/img/1659258858516-iXFo3VOp3T.png?width=800)
![](https://assets.st-note.com/img/1659267371207-1fGhYKf9xz.png?width=800)
![](https://assets.st-note.com/img/1662075389452-fGuZZKNwGU.png)
void main(void) {
vec2 R = resolution.xy;
float d = sin(.6*time*(length(floor((6.*gl_FragCoord.xy - R)/R.y * 5.))));
gl_FragColor = vec4( d,0,.0,1.);
}
![](https://assets.st-note.com/img/1699053389032-TPbEOP9uRe.png?width=800)
お願い致します
void main(void) {
vec2 R = resolution.xy;
float d = sin(.6*time*(length(floor((6.*gl_FragCoord.xy - R)/R.y * 5.))));
gl_FragColor = vec4( d,0,.0,1.);
}
お願い致します