Adjust light direction and view angle
This commit is contained in:
1 parent
1009952a7b
commit
bf2e49a1eb
2 files changed
+4
-4
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
#version 450
|
||||
|
||||
float ambient = 0.05;
|
||||
vec3 light_dir = normalize(vec3(2, 1, -1));
|
||||
vec3 light_dir = normalize(vec3(2, 2, -1));
|
||||
vec3 base_colour = vec3(1.0, 0.94, 0.8);
|
||||
|
||||
layout(location = 0) in vec3 frag_normal;
|
||||
|
||||
@@ -60,11 +60,11 @@ int main(int argc, char *argv[])
|
||||
// Initialise animation
|
||||
animation_state_t anim = animation_init(&model);
|
||||
|
||||
const vec3_t cam = { 0, 4, -4 };
|
||||
const vec3_t tgt = { 0, 0.5, 0 };
|
||||
const vec3_t cam = { 0, 4, -8 };
|
||||
const vec3_t tgt = { 0, 0, 0 };
|
||||
const vp_t vp = {
|
||||
.view = mat4_lookat(cam, tgt, (vec3_t) { 0, 1, 0 }),
|
||||
.proj = mat4_perspective((float)W / H, PI / 8, 0.1, 10.0),
|
||||
.proj = mat4_perspective((float)W / H, PI / 8, 0.1, 100.0),
|
||||
};
|
||||
mat4_t transform1 = mat4_mul(
|
||||
MAT4_TRANSLATE(1, 0, 0),
|
||||
|
||||
Reference in new issue
Block a user