Blender V5.3
gbuffer::Header Struct Reference

#include <eevee_gbuffer_types.bsl.hh>

Public Member Functions

bool is_empty () const
void closure_set (uint bin, GBufferMode mode)
GBufferMode closure (uint bin) const
bool use_object_id () const
void use_object_id_set (bool value)
void tangent_space_id_set (uint layer_id, uint normal_id)
uchar tangent_space_id (uint layer_id) const
void geometry_normal_set (float3 Ng, float3 N)
float3 geometry_normal (float3 surface_N) const
uint3 bin_types () const
GBufferMode bin_type (uchar bin) const
uint3 bin_types_per_layer () const
uint3 bin_index_per_layer () const
bool3 empty_bins () const
uchar closure_len () const
uchar normal_len () const
uint raw () const
bool has_transmission () const
bool has_additional_data () const
uchar bin_to_layer (uchar bin_id) const

Static Public Member Functions

static Header from_data (uint data)
static Header zero ()

Static Public Attributes

static constexpr uint GBUFFER_NORMAL_BITS_SHIFT = 12u
static constexpr uint GBUFFER_GEOMETRIC_NORMAL_BITS_SHIFT = 20u
static constexpr int GBUFFER_HEADER_BITS_PER_BIN = 4

Detailed Description

The GBuffer is polymorphic and its content varies from pixel to pixel. The header contains some common information and layout of the GBuffer content.

Definition at line 305 of file eevee_gbuffer_types.bsl.hh.

Member Function Documentation

◆ bin_index_per_layer()

uint3 gbuffer::Header::bin_index_per_layer ( ) const
inline

◆ bin_to_layer()

uchar gbuffer::Header::bin_to_layer ( uchar bin_id) const
inline

Definition at line 490 of file eevee_gbuffer_types.bsl.hh.

References bin_types(), and gbuffer::GBUF_NONE.

Referenced by gbuffer::Reader::read_bin().

◆ bin_type()

◆ bin_types()

uint3 gbuffer::Header::bin_types ( ) const
inline

◆ bin_types_per_layer()

uint3 gbuffer::Header::bin_types_per_layer ( ) const
inline

Definition at line 418 of file eevee_gbuffer_types.bsl.hh.

References bin_types(), gbuffer::GBUF_NONE, uint3::x, and uint3::y.

Referenced by gbuffer::Reader::read_layers().

◆ closure()

GBufferMode gbuffer::Header::closure ( uint bin) const
inline

Definition at line 352 of file eevee_gbuffer_types.bsl.hh.

References GBUFFER_HEADER_BITS_PER_BIN.

◆ closure_len()

◆ closure_set()

void gbuffer::Header::closure_set ( uint bin,
GBufferMode mode )
inline

Definition at line 348 of file eevee_gbuffer_types.bsl.hh.

References GBUFFER_HEADER_BITS_PER_BIN.

Referenced by gbuffer::pack().

◆ empty_bins()

bool3 gbuffer::Header::empty_bins ( ) const
inline

◆ from_data()

◆ geometry_normal()

float3 gbuffer::Header::geometry_normal ( float3 surface_N) const
inline

◆ geometry_normal_set()

void gbuffer::Header::geometry_normal_set ( float3 Ng,
float3 N )
inline

Definition at line 391 of file eevee_gbuffer_types.bsl.hh.

References gbuffer::geometry_normal_pack(), and N.

Referenced by gbuffer::pack().

◆ has_additional_data()

bool gbuffer::Header::has_additional_data ( ) const
inline

◆ has_transmission()

bool gbuffer::Header::has_transmission ( ) const
inline

◆ is_empty()

bool gbuffer::Header::is_empty ( ) const
inline

Definition at line 343 of file eevee_gbuffer_types.bsl.hh.

Referenced by eevee::fast_gi::resolve(), and eevee::fast_gi::setup().

◆ normal_len()

uchar gbuffer::Header::normal_len ( ) const
inline

Definition at line 454 of file eevee_gbuffer_types.bsl.hh.

◆ raw()

uint gbuffer::Header::raw ( ) const
inline

◆ tangent_space_id()

uchar gbuffer::Header::tangent_space_id ( uint layer_id) const
inline

◆ tangent_space_id_set()

void gbuffer::Header::tangent_space_id_set ( uint layer_id,
uint normal_id )
inline

Set the dedicated normal bit for the specified layer. Expects layer_id to be in [0..2]. Expects normal_id to be in [0..3] (packed in 2bits).

Definition at line 372 of file eevee_gbuffer_types.bsl.hh.

References assert, and GBUFFER_NORMAL_BITS_SHIFT.

Referenced by gbuffer::Packer::reuse_tangent_spaces().

◆ use_object_id()

bool gbuffer::Header::use_object_id ( ) const
inline

◆ use_object_id_set()

void gbuffer::Header::use_object_id_set ( bool value)
inline

Definition at line 362 of file eevee_gbuffer_types.bsl.hh.

References set_flag_from_test().

Referenced by gbuffer::pack().

◆ zero()

Header gbuffer::Header::zero ( )
inlinestatic

Definition at line 338 of file eevee_gbuffer_types.bsl.hh.

References from_data().

Referenced by gbuffer::pack().

Member Data Documentation

◆ GBUFFER_GEOMETRIC_NORMAL_BITS_SHIFT

uint gbuffer::Header::GBUFFER_GEOMETRIC_NORMAL_BITS_SHIFT = 20u
staticconstexpr

Definition at line 307 of file eevee_gbuffer_types.bsl.hh.

◆ GBUFFER_HEADER_BITS_PER_BIN

int gbuffer::Header::GBUFFER_HEADER_BITS_PER_BIN = 4
staticconstexpr

◆ GBUFFER_NORMAL_BITS_SHIFT

uint gbuffer::Header::GBUFFER_NORMAL_BITS_SHIFT = 12u
staticconstexpr

Definition at line 306 of file eevee_gbuffer_types.bsl.hh.

Referenced by tangent_space_id(), and tangent_space_id_set().


The documentation for this struct was generated from the following file: