Questions tagged [glm]
The glm tag has no summary.
19 questions
0 votes
0 answers
6 views
How to rotate at center of instance?
How do I rotate around the instance itself instead of the rotating the entire shader? You can see what I mean by rotating the entire shader in the images below: Here is the main.c: ...
1 vote
1 answer
300 views
Vulkan+glm orthographic projection clipping unexpectedly
I am following along https://vulkan-tutorial.com/ and just finished the chapter on Uniform Buffers. I tried to change the projection matrix to see the outcome, however, when I change the zFar value in ...
2 votes
0 answers
190 views
What is the projection matrix of reverse (Byzantine) perspective?
I would like to construct a projection matrix for reverse perspective. I'm using OpenGL and tried to modify concepts from this excelent tutorial. I came up with: $$ \begin{bmatrix} 2\frac{(near-M)}{...
0 votes
1 answer
144 views
Wrong reflection
Here is a youtube video showing my problem: youtube.com/watch?v=y8J7VhS2pkM I think I'm either doing the texture lookup on the reflection texture wrong, or the reflection or view matrix is somehow ...
0 votes
0 answers
962 views
How to rotate an object in OpenGL on the X, Y and Z axis on its local coordinates?
I've read multiple tutorials, but I still can't understand how do I properly rotate an object in 3D space on all 3 axis at once. For example, I'd like to give the object a pitch of 60 degrees, yaw of ...
1 vote
0 answers
1k views
360 degrees rotation around x axis
How do we rotate the camera around x axis 360 degrees, without having to flip the axis, meaning without having the strange flip after we go over +-90 degrees on <...
1 vote
1 answer
600 views
Am I passing the correct matrices for my shader? openGL/C++
On page 89 of David Wolff - OpenGL 4.0 Shading Language Cookbook book, it suggests a way to set up up a Phong shader in the fragment stage. It lists some different matrices to pass via uniform, and I ...
4 votes
1 answer
9k views
understanding glm::perspective vs glm::ortho
I'm new to computer graphics. I played around with OpenGL and now am trying out Vulkan. Basically what I want to do, in 2D is have an 800x800 window, and I want that to represent 800 meters by 800 ...