Interactive WebGL Goldberg polyhedron viewer and painter with PBR shading, adjustable environment lighting, paint tools (pen, brush, circle, fill, line, pick), undo/redo, colour palettes, and mesh relaxation. Added to the standalone experiments index. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
454 B
GLSL
22 lines
454 B
GLSL
attribute vec3 a_pos;
|
|
attribute vec3 a_color;
|
|
attribute vec2 a_pbr;
|
|
attribute vec4 a_noise;
|
|
uniform mat4 u_mvp;
|
|
uniform mat3 u_norm;
|
|
varying vec3 v_pos;
|
|
varying vec3 v_normal;
|
|
varying vec3 v_color;
|
|
varying vec2 v_pbr;
|
|
varying vec3 v_obj_pos;
|
|
varying vec4 v_noise;
|
|
void main() {
|
|
gl_Position = u_mvp * vec4(a_pos, 1.0);
|
|
v_pos = u_norm * a_pos;
|
|
v_normal = v_pos;
|
|
v_color = a_color;
|
|
v_pbr = a_pbr;
|
|
v_obj_pos = a_pos;
|
|
v_noise = a_noise;
|
|
}
|