From db41d43345ea73cf7c1bbb29448e52ffb822e3e0 Mon Sep 17 00:00:00 2001 From: vimene Date: Tue, 13 Jan 2026 02:04:52 +0100 Subject: added textures for the hardware renderer - removed "using" directive in .hpp - reverse order of arguments for quaternion rotation, i.e. q.rot(v) instead of v.rot(q), where q is a quaterinon and v a vector - pass the inverse of the view matrix to render_and_present_frame, to allow light calculation in shaders (we used to just pass the matrix of the quaternion of the transformation, i.e. discard scaling and translations) - added another mesh and texture (viking_room) for testing purposes - added transparent background option - added Quaternion::look_towards(), which is the equivalent of Matrix4::look_at() but only for rotations - various improvement to .obj parsing - load texture coordinates from .obj file - merged duplicate vertices in Mesh::linearize_indices() --- Makefile.am | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 0e3ddf4..3297551 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,9 +3,21 @@ SUBDIRS = src ACLOCAL_AMFLAGS = -Im4 --install assetsdir = $(datarootdir)/assets -assets_DATA = ../assets/suzanne.obj +assets_DATA = ../assets/suzanne.obj ../assets/viking_room.obj EXTRA_DIST += $(assets_DATA) texturesdir = $(assetsdir)/textures -textures_DATA = ../assets/textures/texture.jpg +textures_DATA = ../assets/textures/texture.jpg ../assets/textures/viking_room.png EXTRA_DIST += $(textures_DATA) + +# assets origin: +# - assets/suzanne.obj +# taken from Blender +# - assets/texture.jpg +# comes from here https://pixabay.com/photos/statue-sculpture-figure-1275469/, modified by the +# author(s) of the vulkan tutorials (see +# https://docs.vulkan.org/tutorial/latest/06_Texture_mapping/00_Images.html#_loading_an_image) +# - assets/viking_room.obj & assets/textures/viking_room.png +# comes from here https://sketchfab.com/3d-models/viking-room-a49f1b8e4f5c4ecf9e1fe7d81915ad38, +# modified by the author(s) of the vulkan tutorials (see +# https://docs.vulkan.org/tutorial/latest/08_Loading_models.html#_sample_mesh) -- cgit v1.2.3