feat: add lights

This commit is contained in:
2025-10-14 11:45:46 +02:00
parent c34d3f803f
commit 50a4f56e75
14 changed files with 355 additions and 10 deletions

View File

@@ -1,12 +1,19 @@
uniform mat4 mvp;
uniform mat4 modelView;
uniform mat4 normalMatrix;
attribute vec3 vpos;
attribute vec3 vcolor;
attribute vec2 vtexcoord;
attribute vec3 vnormal;
varying vec3 fcolor;
varying vec2 ftexcoord;
varying vec3 fnormal;
varying vec4 fposition;
void main() {
gl_Position = mvp * vec4(vpos, 1);
fcolor = vcolor;
ftexcoord = vtexcoord;
fnormal = vec3(normalMatrix * vec4(vnormal, 0.0));
fposition = modelView * vec4(vpos, 1);
}