Published
Edited
Dec 18, 2018
3 forks
23 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
shader`
varying vec2 vUv;

void main() {
vec2 xy = sin(3.0 * vUv);
gl_FragColor = vec4(xy, 0.0, 1.0);
}
`
Insert cell
shader`
varying vec2 vUv;

void main() {
vec2 xy = sin(3.0 * vUv);
gl_FragColor = vec4(xy, 1.0, 1.0);
}
`
Insert cell
Insert cell
shader`
varying vec2 vUv;

void main() {
float x = 1.0 - pow(abs(vUv.x), 3.5);
float y = 1.0 - pow(abs(vUv.y), 2.0);
gl_FragColor = vec4(x, 1.0, y, 1.0);
}
`
Insert cell
Insert cell
shader`
varying vec2 vUv;
#define PI 3.14159265359

void main() {
float x = pow(cos(PI * vUv.x / 2.0), 2.0);
float y = pow(sin(PI * vUv.y / 2.0), 2.0);
gl_FragColor = vec4(1.0, x, y, 1.0);
}
`
Insert cell
Insert cell
shader`
varying vec2 vUv;
#define PI 3.14159265359

void main() {
float x = 1.0 - pow(max(0.0, abs(vUv.x) * 2.0 - 1.0), 0.5);
float y = 1.0 - pow(max(0.0, abs(vUv.y) * 2.0 - 1.0), 0.5);
gl_FragColor = vec4(x, y, 1.0, 1.0);
}
`
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more