You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, our camera was only supporting perspective projection.
However, it is sometimes convenient to use orthographic projection
(Shadow mapping, 2D graphics, isometric games...).
- A new method has been added to `OvMaths::FMatrix4` to create an
orthographic projection matrix.
- The rendering side camera has a new `m_projectionMode` setting and
is now considering this setting for the projection calculation.
An extra `m_size` setting has been added for orthographic camera.
- The camera component has been updated to expose and serialize these new settings.
- Lua binding has been updated to support these new methods.
- Frustum drawing (Editor) has been updated to support orthographic
projection.
Note: Adding a new serialized member to an Overload component is
currently a problem. When deserializing, we are not considering
the case when the XML file doesn't contain a certain entry, and thus, some
garbage values are sometimes loaded. A dirty check has been done in
order to prevent the camera projection setting to be a garbage value on
our old scenes (Retro-compatibility), but we should replace this by a
new safer deserialization solution.
// We have to make sure the "projection_mode" exists in the serialized component, otherwise we do not want to modify the default setting (Perspective).
133
+
// This is a bad practice to have each components calling setters in `OnDeserialize` even if no XML node hasn't been found for a given property.
134
+
// We should rework this system later. As it is out of the scope of the orthographic projection scope, this will be left as is for now.
0 commit comments