diff --git a/demo/ball.glb b/demo/ball.glb new file mode 100644 index 0000000..2fc41b4 Binary files /dev/null and b/demo/ball.glb differ diff --git a/demo/main.lua b/demo/main.lua index 9154ec3..79df4d9 100644 --- a/demo/main.lua +++ b/demo/main.lua @@ -31,7 +31,7 @@ function init() light.color = couch.Vector3(1.0, 1.0, 1.0) light.ambient = 0.2 light.diffuse = 1.0 - light.specular = 0.0001 + light.specular = 0.01 couch.Node.GetRoot().children:Append(light) ball = couch.Mesh.FromFile("cube.glb") @@ -41,7 +41,7 @@ function init() ball:SetMaterial(0, material) couch.Node.GetRoot().children:Append(ball) - ball1 = couch.Mesh.FromFile("cube.glb") + ball1 = couch.Mesh.FromFile("ball.glb") material = couch.Material() material.tex = couch.Texture.FromFile("container.png") material.usesTex = true diff --git a/shaders/flat.frag b/shaders/flat.frag index 10c6970..d9fc34b 100644 --- a/shaders/flat.frag +++ b/shaders/flat.frag @@ -2,7 +2,7 @@ in vec3 UV; in vec3 NORMAL; -in vec3 LIGHT; +flat in vec3 LIGHT; out vec4 FragColor; diff --git a/shaders/flat.vert b/shaders/flat.vert index 486f2f2..61792e1 100644 --- a/shaders/flat.vert +++ b/shaders/flat.vert @@ -10,7 +10,7 @@ uniform mat4 PROJECTION; out vec3 UV; out vec3 NORMAL; -out vec3 LIGHT; +flat out vec3 LIGHT; struct DirectionalLight { vec3 direction;