Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_camera.hh')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_camera.hh9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_camera.hh b/source/blender/draw/engines/eevee_next/eevee_camera.hh
index 8bf64199246..c1d65dbf31e 100644
--- a/source/blender/draw/engines/eevee_next/eevee_camera.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_camera.hh
@@ -13,7 +13,7 @@ namespace blender::eevee {
class Instance;
-static const float cubeface_mat[6][4][4] = {
+inline constexpr float cubeface_mat[6][4][4] = {
/* Pos X */
{{0.0f, 0.0f, -1.0f, 0.0f},
{0.0f, -1.0f, 0.0f, 0.0f},
@@ -82,7 +82,6 @@ class Camera {
private:
Instance &inst_;
- /** Double buffered to detect changes and have history for re-projection. */
CameraDataBuf data_;
public:
@@ -100,7 +99,7 @@ class Camera {
BLI_assert(data_.initialized);
return data_;
}
- const GPUUniformBuf *ubo_get() const
+ GPUUniformBuf *ubo_get() const
{
return data_;
}
@@ -112,6 +111,10 @@ class Camera {
{
return data_.type == CAMERA_ORTHO;
}
+ bool is_perspective() const
+ {
+ return data_.type == CAMERA_PERSP;
+ }
const float3 &position() const
{
return *reinterpret_cast<const float3 *>(data_.viewinv[3]);