Blender V4.3
draw_shader_shared.hh File Reference
#include "GPU_shader.hh"
#include "GPU_shader_shared_utils.hh"
#include "draw_defines.hh"

Go to the source code of this file.

Classes

struct  FrustumCorners
 
struct  FrustumPlanes
 
struct  ViewCullingData
 
struct  ViewMatrices
 
struct  ObjectMatrices
 
struct  ObjectInfos
 
struct  ObjectBounds
 
struct  VolumeInfos
 
struct  CurvesInfos
 
struct  ObjectAttribute
 
struct  LayerAttribute
 
struct  DrawCommand
 
struct  DispatchCommand
 
struct  DRWDebugPrintBuffer
 
struct  DRWDebugVert
 
struct  DRWDebugDrawBuffer
 

Macros

#define DRW_SHADER_SHARED_H
 
#define DRW_RESOURCE_CHUNK_LEN   512
 
#define DRW_GRID_PER_VOLUME_MAX   16
 
#define DRW_ATTRIBUTE_PER_CURVES_MAX   15
 
#define _inner_sphere_radius   bounding_corners[3].w
 
Views
#define drw_view_id   0
 
#define DRW_VIEW_LEN   1
 
#define DRW_VIEW_SHIFT   0
 
#define DRW_VIEW_FROM_RESOURCE_ID
 
Debug print
#define DRW_DEBUG_PRINT_MAX   (8 * 1024) - 4
 
#define DRW_DEBUG_PRINT_WORD_WRAP_COLUMN   120u
 
#define drw_debug_print_cursor   drw_debug_print_buf[0]
 
#define drw_debug_print_row_shared   drw_debug_print_buf[3]
 
#define drw_debug_print_offset   8
 

Debug draw shapes

#define DRW_DEBUG_DRAW_VERT_MAX   (64 * 8192) - 1
 
#define drw_debug_draw_v_count   drw_debug_verts_buf[0].pos0
 
#define drw_debug_draw_offset   2
 
enum  eObjectInfoFlag : uint32_t {
  OBJECT_SELECTED = (1u << 0u) , OBJECT_FROM_DUPLI = (1u << 1u) , OBJECT_FROM_SET = (1u << 2u) , OBJECT_ACTIVE = (1u << 3u) ,
  OBJECT_NEGATIVE_SCALE = (1u << 4u) , OBJECT_HOLDOUT = (1u << 5u) , OBJECT_NO_INFO = ~OBJECT_HOLDOUT
}
 
uint receiver_light_set_get (ObjectInfos object_infos)
 
uint blocker_shadow_set_get (ObjectInfos object_infos)
 
bool drw_bounds_corners_are_valid (ObjectBounds bounds)
 
bool drw_bounds_are_valid (ObjectBounds bounds)
 
DRWDebugVert debug_vert_make (uint in_pos0, uint in_pos1, uint in_pos2, uint in_vert_color)
 

Macro Definition Documentation

◆ _inner_sphere_radius

#define _inner_sphere_radius   bounding_corners[3].w

Radius of the inscribed sphere derived from the bounding corner. Computed on GPU.

Definition at line 216 of file draw_shader_shared.hh.

◆ DRW_ATTRIBUTE_PER_CURVES_MAX

#define DRW_ATTRIBUTE_PER_CURVES_MAX   15

Definition at line 56 of file draw_shader_shared.hh.

◆ drw_debug_draw_offset

#define drw_debug_draw_offset   2

Offset to the first data. Equal to: sizeof(DrawCommand) / sizeof(DRWDebugVert). This is needed because we bind the whole buffer as a DRWDebugVert array.

Definition at line 415 of file draw_shader_shared.hh.

◆ drw_debug_draw_v_count

#define drw_debug_draw_v_count   drw_debug_verts_buf[0].pos0

Definition at line 410 of file draw_shader_shared.hh.

◆ DRW_DEBUG_DRAW_VERT_MAX

#define DRW_DEBUG_DRAW_VERT_MAX   (64 * 8192) - 1

Definition at line 399 of file draw_shader_shared.hh.

◆ drw_debug_print_cursor

#define drw_debug_print_cursor   drw_debug_print_buf[0]

Definition at line 361 of file draw_shader_shared.hh.

◆ DRW_DEBUG_PRINT_MAX

#define DRW_DEBUG_PRINT_MAX   (8 * 1024) - 4

Definition at line 347 of file draw_shader_shared.hh.

◆ drw_debug_print_offset

#define drw_debug_print_offset   8

Offset to the first data. Equal to: sizeof(DrawCommand) / sizeof(uint). This is needed because we bind the whole buffer as a uint array.

Definition at line 369 of file draw_shader_shared.hh.

◆ drw_debug_print_row_shared

#define drw_debug_print_row_shared   drw_debug_print_buf[3]

Definition at line 364 of file draw_shader_shared.hh.

◆ DRW_DEBUG_PRINT_WORD_WRAP_COLUMN

#define DRW_DEBUG_PRINT_WORD_WRAP_COLUMN   120u
Note
Cannot be more than 255 (because of column encoding).

Definition at line 349 of file draw_shader_shared.hh.

◆ DRW_GRID_PER_VOLUME_MAX

#define DRW_GRID_PER_VOLUME_MAX   16

Definition at line 52 of file draw_shader_shared.hh.

◆ DRW_RESOURCE_CHUNK_LEN

#define DRW_RESOURCE_CHUNK_LEN   512

Definition at line 49 of file draw_shader_shared.hh.

◆ DRW_SHADER_SHARED_H

#define DRW_SHADER_SHARED_H

Definition at line 47 of file draw_shader_shared.hh.

◆ DRW_VIEW_FROM_RESOURCE_ID

#define DRW_VIEW_FROM_RESOURCE_ID

Definition at line 67 of file draw_shader_shared.hh.

◆ drw_view_id

#define drw_view_id   0

Definition at line 64 of file draw_shader_shared.hh.

◆ DRW_VIEW_LEN

#define DRW_VIEW_LEN   1

Definition at line 65 of file draw_shader_shared.hh.

◆ DRW_VIEW_SHIFT

#define DRW_VIEW_SHIFT   0

Definition at line 66 of file draw_shader_shared.hh.

Enumeration Type Documentation

◆ eObjectInfoFlag

Enumerator
OBJECT_SELECTED 
OBJECT_FROM_DUPLI 
OBJECT_FROM_SET 
OBJECT_ACTIVE 
OBJECT_NEGATIVE_SCALE 
OBJECT_HOLDOUT 
OBJECT_NO_INFO 

Definition at line 150 of file draw_shader_shared.hh.

Function Documentation

◆ blocker_shadow_set_get()

uint blocker_shadow_set_get ( ObjectInfos object_infos)
inline

◆ debug_vert_make()

DRWDebugVert debug_vert_make ( uint in_pos0,
uint in_pos1,
uint in_pos2,
uint in_vert_color )
inline

◆ drw_bounds_are_valid()

bool drw_bounds_are_valid ( ObjectBounds bounds)
inline

Definition at line 238 of file draw_shader_shared.hh.

References bounds().

◆ drw_bounds_corners_are_valid()

bool drw_bounds_corners_are_valid ( ObjectBounds bounds)
inline

Definition at line 230 of file draw_shader_shared.hh.

References bounds().

◆ receiver_light_set_get()

uint receiver_light_set_get ( ObjectInfos object_infos)
inline

Definition at line 189 of file draw_shader_shared.hh.