Latest glm Activity
Thank you for the hint. I visualized the normal vectors and saw that they all had seemingly random orientations:
I printed out the calculated normals and visualized them by hand, confirming that they are actually all correct. I then changed my focus to the matter of actually sending this data to th…
@Vilem Otte Thanks for your suggestions. I use the same approach like calculating a shadow map. I use the depth buffer to check if certain lumels are visible from the light sources and if they are, I color them accordingly. For the depth buffer - I use the default depth buffer. If I'm not mis…
It's not possible to prevent flipping if you construct a tangent for given normal, but if your tangent is free, you can minimize it's change over time with a changing normal. To do this, you need to store the tangent (or the whole matrix), and keep rotating it each frame so one chosen axis matches …
Looks like the issue was that I was including the projection matrix in `invMat`. Removing it has resolved the issue. Below is what I wound up with:
glm::mat4 invMat = glm::inverse(worldStage.getCamera().value().getViewMatrix());
glm::vec4 tmp = (this->weapons[this->currentWeapon].actor->get…
I am making a 3D space shooter game using OpenGL and Bullet Physics. I am having a hard time with the 3rd person Camera though. If you take a look at the video above you can see that the camera follows the spaceship rotating on the X axis without a problem and rotating on Z axis also without a prob…