Quake II RTX doxygen  1.0 dev
vertex_buffer.h File Reference

Go to the source code of this file.

Classes

struct  VertexBuffer
 
struct  LightBuffer
 
struct  ToneMappingBuffer
 
struct  ReadbackBuffer
 
struct  SunColorBuffer
 

Macros

#define MAX_VERT_BSP   (1 << 21)
 
#define MAX_VERT_MODEL   (1 << 22)
 
#define MAX_IDX_MODEL   (1 << 22)
 
#define MAX_PRIM_MODEL   (MAX_IDX_MODEL / 3)
 
#define MAX_VERT_INSTANCED   (1 << 21)
 
#define MAX_IDX_INSTANCED   (MAX_VERT_INSTANCED / 3)
 
#define MAX_LIGHT_LISTS   (1 << 14)
 
#define MAX_LIGHT_LIST_NODES   (1 << 19)
 
#define MAX_LIGHT_POLYS   4096
 
#define LIGHT_POLY_VEC4S   4
 
#define MAX_PBR_MATERIALS   4096
 
#define LIGHT_TEXTURE_SCALE   0
 
#define ALIGN_SIZE_4(x, n)   ((x * n + 3) & (~3))
 
#define VERTEX_BUFFER_BINDING_IDX   0
 
#define LIGHT_BUFFER_BINDING_IDX   1
 
#define READBACK_BUFFER_BINDING_IDX   2
 
#define TONE_MAPPING_BUFFER_BINDING_IDX   3
 
#define SUN_COLOR_BUFFER_BINDING_IDX   4
 
#define SUN_COLOR_UBO_BINDING_IDX   5
 
#define LIGHT_STATS_BUFFER_BINDING_IDX   6
 
#define SUN_COLOR_ACCUMULATOR_FIXED_POINT_SCALE   0x100000
 
#define SKY_COLOR_ACCUMULATOR_FIXED_POINT_SCALE   0x100
 
#define VERTEX_BUFFER_LIST
 
#define LIGHT_BUFFER_LIST
 
#define VERTEX_BUFFER_LIST_DO(type, dim, name, size)   type name[ALIGN_SIZE_4(size, dim)];
 
#define LIGHT_BUFFER_LIST_DO(type, dim, name, size)   type name[ALIGN_SIZE_4(size, dim)];
 

Typedefs

typedef int ivec3_t[3]
 
typedef int ivec4_t[4]
 
typedef struct VertexBuffer VertexBuffer
 
typedef struct LightBuffer LightBuffer
 
typedef struct ReadbackBuffer ReadbackBuffer
 
typedef struct ToneMappingBuffer ToneMappingBuffer
 
typedef struct SunColorBuffer SunColorBuffer
 

Macro Definition Documentation

◆ ALIGN_SIZE_4

#define ALIGN_SIZE_4 (   x,
 
)    ((x * n + 3) & (~3))

Definition at line 43 of file vertex_buffer.h.

◆ LIGHT_BUFFER_BINDING_IDX

#define LIGHT_BUFFER_BINDING_IDX   1

Definition at line 46 of file vertex_buffer.h.

◆ LIGHT_BUFFER_LIST

#define LIGHT_BUFFER_LIST
Value:
LIGHT_BUFFER_LIST_DO(uint32_t, 4, material_table, (MAX_PBR_MATERIALS)) \
LIGHT_BUFFER_LIST_DO(float, 4, light_polys, (MAX_LIGHT_POLYS * LIGHT_POLY_VEC4S)) \
LIGHT_BUFFER_LIST_DO(uint32_t, 1, light_list_offsets, (MAX_LIGHT_LISTS )) \
LIGHT_BUFFER_LIST_DO(uint32_t, 1, light_list_lights, (MAX_LIGHT_LIST_NODES)) \
LIGHT_BUFFER_LIST_DO(float, 1, light_styles, (MAX_LIGHT_STYLES )) \
LIGHT_BUFFER_LIST_DO(uint32_t, 1, cluster_debug_mask, (MAX_LIGHT_LISTS / 32)) \

Definition at line 88 of file vertex_buffer.h.

◆ LIGHT_BUFFER_LIST_DO

#define LIGHT_BUFFER_LIST_DO (   type,
  dim,
  name,
  size 
)    type name[ALIGN_SIZE_4(size, dim)];

Definition at line 108 of file vertex_buffer.h.

◆ LIGHT_POLY_VEC4S

#define LIGHT_POLY_VEC4S   4

Definition at line 36 of file vertex_buffer.h.

◆ LIGHT_STATS_BUFFER_BINDING_IDX

#define LIGHT_STATS_BUFFER_BINDING_IDX   6

Definition at line 51 of file vertex_buffer.h.

◆ LIGHT_TEXTURE_SCALE

#define LIGHT_TEXTURE_SCALE   0

Definition at line 41 of file vertex_buffer.h.

◆ MAX_IDX_INSTANCED

#define MAX_IDX_INSTANCED   (MAX_VERT_INSTANCED / 3)

Definition at line 30 of file vertex_buffer.h.

◆ MAX_IDX_MODEL

#define MAX_IDX_MODEL   (1 << 22)

Definition at line 26 of file vertex_buffer.h.

◆ MAX_LIGHT_LIST_NODES

#define MAX_LIGHT_LIST_NODES   (1 << 19)

Definition at line 33 of file vertex_buffer.h.

◆ MAX_LIGHT_LISTS

#define MAX_LIGHT_LISTS   (1 << 14)

Definition at line 32 of file vertex_buffer.h.

◆ MAX_LIGHT_POLYS

#define MAX_LIGHT_POLYS   4096

Definition at line 35 of file vertex_buffer.h.

◆ MAX_PBR_MATERIALS

#define MAX_PBR_MATERIALS   4096

Definition at line 39 of file vertex_buffer.h.

◆ MAX_PRIM_MODEL

#define MAX_PRIM_MODEL   (MAX_IDX_MODEL / 3)

Definition at line 27 of file vertex_buffer.h.

◆ MAX_VERT_BSP

#define MAX_VERT_BSP   (1 << 21)

Definition at line 23 of file vertex_buffer.h.

◆ MAX_VERT_INSTANCED

#define MAX_VERT_INSTANCED   (1 << 21)

Definition at line 29 of file vertex_buffer.h.

◆ MAX_VERT_MODEL

#define MAX_VERT_MODEL   (1 << 22)

Definition at line 25 of file vertex_buffer.h.

◆ READBACK_BUFFER_BINDING_IDX

#define READBACK_BUFFER_BINDING_IDX   2

Definition at line 47 of file vertex_buffer.h.

◆ SKY_COLOR_ACCUMULATOR_FIXED_POINT_SCALE

#define SKY_COLOR_ACCUMULATOR_FIXED_POINT_SCALE   0x100

Definition at line 54 of file vertex_buffer.h.

◆ SUN_COLOR_ACCUMULATOR_FIXED_POINT_SCALE

#define SUN_COLOR_ACCUMULATOR_FIXED_POINT_SCALE   0x100000

Definition at line 53 of file vertex_buffer.h.

◆ SUN_COLOR_BUFFER_BINDING_IDX

#define SUN_COLOR_BUFFER_BINDING_IDX   4

Definition at line 49 of file vertex_buffer.h.

◆ SUN_COLOR_UBO_BINDING_IDX

#define SUN_COLOR_UBO_BINDING_IDX   5

Definition at line 50 of file vertex_buffer.h.

◆ TONE_MAPPING_BUFFER_BINDING_IDX

#define TONE_MAPPING_BUFFER_BINDING_IDX   3

Definition at line 48 of file vertex_buffer.h.

◆ VERTEX_BUFFER_BINDING_IDX

#define VERTEX_BUFFER_BINDING_IDX   0

Definition at line 45 of file vertex_buffer.h.

◆ VERTEX_BUFFER_LIST

#define VERTEX_BUFFER_LIST
Value:
VERTEX_BUFFER_LIST_DO(float, 3, positions_bsp, (MAX_VERT_BSP )) \
VERTEX_BUFFER_LIST_DO(float, 2, tex_coords_bsp, (MAX_VERT_BSP )) \
VERTEX_BUFFER_LIST_DO(float, 3, tangents_bsp, (MAX_VERT_BSP / 3 )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 1, materials_bsp, (MAX_VERT_BSP / 3 )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 1, clusters_bsp, (MAX_VERT_BSP / 3 )) \
VERTEX_BUFFER_LIST_DO(float, 1, texel_density_bsp, (MAX_VERT_BSP / 3 )) \
VERTEX_BUFFER_LIST_DO(float, 3, positions_model, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 3, normals_model, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 2, tex_coords_model, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 4, tangents_model, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 3, idx_model, (MAX_IDX_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 3, positions_instanced, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 3, pos_prev_instanced, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 3, normals_instanced, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 3, tangents_instanced, (MAX_PRIM_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 2, tex_coords_instanced, (MAX_VERT_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 1, alpha_instanced, (MAX_PRIM_MODEL )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 1, clusters_instanced, (MAX_PRIM_MODEL )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 1, materials_instanced, (MAX_PRIM_MODEL )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 1, instance_id_instanced, (MAX_PRIM_MODEL )) \
VERTEX_BUFFER_LIST_DO(float, 1, texel_density_instanced, (MAX_PRIM_MODEL )) \
VERTEX_BUFFER_LIST_DO(uint32_t, 1, sky_visibility, (MAX_LIGHT_LISTS / 32)) \

Definition at line 60 of file vertex_buffer.h.

◆ VERTEX_BUFFER_LIST_DO

#define VERTEX_BUFFER_LIST_DO (   type,
  dim,
  name,
  size 
)    type name[ALIGN_SIZE_4(size, dim)];

Definition at line 98 of file vertex_buffer.h.

Typedef Documentation

◆ ivec3_t

typedef int ivec3_t[3]

Definition at line 126 of file vertex_buffer.h.

◆ ivec4_t

typedef int ivec4_t[4]

Definition at line 127 of file vertex_buffer.h.

◆ LightBuffer

typedef struct LightBuffer LightBuffer

Definition at line 160 of file vertex_buffer.h.

◆ ReadbackBuffer

Definition at line 161 of file vertex_buffer.h.

◆ SunColorBuffer

Definition at line 163 of file vertex_buffer.h.

◆ ToneMappingBuffer

Definition at line 162 of file vertex_buffer.h.

◆ VertexBuffer

typedef struct VertexBuffer VertexBuffer

Definition at line 159 of file vertex_buffer.h.

MAX_LIGHT_LIST_NODES
#define MAX_LIGHT_LIST_NODES
Definition: vertex_buffer.h:33
MAX_VERT_MODEL
#define MAX_VERT_MODEL
Definition: vertex_buffer.h:25
MAX_PBR_MATERIALS
#define MAX_PBR_MATERIALS
Definition: vertex_buffer.h:39
LIGHT_POLY_VEC4S
#define LIGHT_POLY_VEC4S
Definition: vertex_buffer.h:36
LIGHT_BUFFER_LIST_DO
#define LIGHT_BUFFER_LIST_DO(type, dim, name, size)
Definition: vertex_buffer.h:108
MAX_IDX_MODEL
#define MAX_IDX_MODEL
Definition: vertex_buffer.h:26
VERTEX_BUFFER_LIST_DO
#define VERTEX_BUFFER_LIST_DO(type, dim, name, size)
Definition: vertex_buffer.h:98
MAX_PRIM_MODEL
#define MAX_PRIM_MODEL
Definition: vertex_buffer.h:27
MAX_VERT_BSP
#define MAX_VERT_BSP
Definition: vertex_buffer.h:23
MAX_LIGHT_LISTS
#define MAX_LIGHT_LISTS
Definition: vertex_buffer.h:32
MAX_LIGHT_POLYS
#define MAX_LIGHT_POLYS
Definition: vertex_buffer.h:35
MAX_LIGHT_STYLES
#define MAX_LIGHT_STYLES
Definition: constants.h:105
cluster_debug_mask
char cluster_debug_mask[VIS_MAX_BYTES]
Definition: main.c:83