Should I ever use a `vec3` inside of a uniform buffer or shader storage buffer object?

NO! Never do this! When declaring UBOs/SSBOs, pretend that all 3-element vector types don’t exist. This includes column-major matrices with 3 rows or row-major matrices with 3 columns. Pretend that the only types are scalars, 2, and 4 element vectors (and matrices). You will save yourself a very great deal of grief if you do … Read more

OpenGL – vertex normals in OBJ

normal/bump maps Provide fine details without increasing complexity of geometry that means more details at very low performance cost. Normal/bump maps are optional of coarse. normal shading (fragment shader) Normal is vector perpendicular to fragment/face/primitive there are 2 use for it: dull surface illumination lets have: color – per fragment/face/primitive color (modulated with texture) normal … Read more

How do I compose a rotation matrix with human readable angles from scratch?

So the question really is Understanding 4×4 homogenous transform matrices well without the math behind the only thing that left is geometric representation/meaning which is far better for human abstraction/understanding. So what the 4×4 matrix is? It is representation of some Cartesian coordinate system and it is composed of: 3 basis vectors (one for each … Read more