feat(3): Task 3

This commit is contained in:
Tibo De Peuter 2024-12-06 15:04:49 +01:00
parent 7832cb21ac
commit 29c45e43e8
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2

View file

@ -35,10 +35,15 @@ void main()
// (so before model, view, proj are applied)
/////////////////////////////////////////////////////////////////////////////
// Replace with your code
// Replace with your code
// Based on:
// https://learnopengl.com/Guest-Articles/2021/Tessellation/Tessellation
sphere_fs_in = normalize(interp_pos.xyz);
view_pos_fs_in = view * model(is_moon, animation_seconds) * vec4(sphere_fs_in, 1.0);
normal_fs_in = normalize(mat3(view * model(is_moon, animation_seconds)) * sphere_fs_in);
pos_fs_in = proj * view_pos_fs_in;
gl_Position = interp_pos;
gl_Position = pos_fs_in;
/////////////////////////////////////////////////////////////////////////////
}