SakulFlee / Akimo-Project

Other
0 stars 0 forks source link

Proper Camera #186

Open SakulFlee opened 2 weeks ago

SakulFlee commented 2 weeks ago

The idea would be the following:

This way, an Element can be a Camera, use input events and messaging to move it, etc.
Furthermore, we can have different Cameras. They just need to figure out who is active.

This would also, technically at least, allow for different kinds of Cameras. If I am not mistaken, it shouldn't matter if it's a Perspective or Orthogonal Camera, the resulting Matrix will be in the same format and will be used the same by the Shader.

Note: Fact check the above! No idea if actually true.

There might be some access issues as the Camera Matrix actually is a Buffer(?) we have to share with the Renderer. There might be some caching we can do though, like keep a Matrix inside e.g. World and only update the Buffer when there is a change. Or, let the Renderer take care of the Buffer and inform it when there is a change in the Matrix.

Whatever makes more sense and works best.