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/intern/draw_shader_shared.h')
-rw-r--r--source/blender/draw/intern/draw_shader_shared.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/draw/intern/draw_shader_shared.h b/source/blender/draw/intern/draw_shader_shared.h
index c6cd15551b9..13f21323552 100644
--- a/source/blender/draw/intern/draw_shader_shared.h
+++ b/source/blender/draw/intern/draw_shader_shared.h
@@ -7,6 +7,7 @@
# include "GPU_shader_shared_utils.h"
# include "draw_defines.h"
+typedef struct ViewCullingData ViewCullingData;
typedef struct ViewInfos ViewInfos;
typedef struct ObjectMatrices ObjectMatrices;
typedef struct ObjectInfos ObjectInfos;
@@ -50,6 +51,15 @@ typedef enum eObjectInfoFlag eObjectInfoFlag;
* This should be kept in sync with `GPU_ATTR_MAX` */
#define DRW_ATTRIBUTE_PER_CURVES_MAX 15
+struct ViewCullingData {
+ /** \note vec3 array padded to vec4. */
+ /** Frustum corners. */
+ float4 corners[8];
+ float4 planes[6];
+ float4 bound_sphere;
+};
+BLI_STATIC_ASSERT_ALIGN(ViewCullingData, 16)
+
struct ViewInfos {
/* View matrices */
float4x4 viewmat;
@@ -65,12 +75,6 @@ struct ViewInfos {
float2 viewport_size;
float2 viewport_size_inverse;
- /** Frustum culling data. */
- /** \note vec3 array padded to vec4. */
- float4 frustum_corners[8];
- float4 frustum_planes[6];
- float4 frustum_bound_sphere;
-
/** For debugging purpose */
/* Mouse pixel. */
int2 mouse_pixel;