vertex
x
y
color
1
2
3
vertex
x
y
color
1
2
3
4
5
6
vertex
x
y
center
vertices
radius
color
Clip Space
Screen Width
Screen Height
devicePixelRatio
1.00
Error log:
Vertex Shader
#version 300 es
precision mediump float;
in vec2 vertexPosition;
in vec3 vertexColor;
out vec3 fragmentColor;
void main() {
fragmentColor
=
vertexColor;
gl_Position = vec4(
vertexPosition
, 0.0, 1.0);
}
Fragment Shader
#version 300 es
precision mediump float;
in vec3 fragmentColor;
out vec4 outputColor;
void main() {
outputColor = vec4(
fragmentColor
, 0.0);
}
Learning
Computer Graphics
with
WebGL2
on
Shapes and Colors
Motion and Dynamics
3D Principles
UNDER THE HOOD - WEB LABS