Blender V5.3
occupancy Namespace Reference

Classes

struct  Bits

Functions

int bit_index_from_depth (float depth, int bit_count)
Bits bits_from_depth (float depth, int bit_count)
Bits occupancy_new ()
Bits bit_from_depth (float depth, int bit_count)
Bits bitwise_or (Bits a, Bits b)
Bits set_bits_high (Bits occupancy, int bit_start, int bit_count)
int find_lsb (Bits occupancy)
uint4 to_uint4 (Bits occupancy)
bool bit_resolve (Bits entry, Bits exit, uint bit_n, int)
Bits resolve (Bits entry, Bits exit, int bit_count)

Function Documentation

◆ bit_from_depth()

Bits occupancy::bit_from_depth ( float depth,
int bit_count )

Example with for 16bits per layer and 2 layers. 0 Layer0 15 16 Layer1 31 < Bits index from LSB to MSB (left to right) |-----------—| |-----------—| 0000000001000010 0001000000000000 < Surf entry points 0000000000000000 0100001000000000 < Surf exit points 0000000001111111 1001110000000000 < Result occupancy at each froxel depths after resolve depth in [0..1] range. bit_count in [1..256] range.

Definition at line 69 of file eevee_occupancy_lib.bsl.hh.

References bit_from_depth(), and bit_index_from_depth().

Referenced by bit_from_depth(), and eevee_test_occupancy_main().

◆ bit_index_from_depth()

int occupancy::bit_index_from_depth ( float depth,
int bit_count )

◆ bit_resolve()

bool occupancy::bit_resolve ( Bits entry,
Bits exit,
uint bit_n,
int  )

From a entry and exit occupancy tuple, returns if a specific bit is inside the volume.

Definition at line 132 of file eevee_occupancy_lib.bsl.hh.

References bit_resolve(), occupancy::Bits::bits, find_lsb(), and flag_test().

Referenced by bit_resolve(), and resolve().

◆ bits_from_depth()

Bits occupancy::bits_from_depth ( float depth,
int bit_count )

Example with for 16bits per layer and 2 layers. 0 Layer0 15 16 Layer1 31 < Bits index from LSB to MSB (left to right) |-----------—| |-----------—| 0000000001111111 1111111111111111 < Surf0 0000000000000000 0000001111111111 < Surf1 0000000001111111 1111110000000000 < Result occupancy at each froxel depths depth in [0..1] range. bit_count in [1..256] range.

Definition at line 32 of file eevee_occupancy_lib.bsl.hh.

References bit_index_from_depth(), bits_from_depth(), and clamp().

Referenced by bits_from_depth(), eevee_test_occupancy_main(), and eevee::surf_occupancy().

◆ bitwise_or()

Bits occupancy::bitwise_or ( Bits a,
Bits b )

Same as binary OR but for the whole Bits structure.

Definition at line 87 of file eevee_occupancy_lib.bsl.hh.

References b, occupancy::Bits::bits, and bitwise_or().

Referenced by bitwise_or(), and eevee_test_occupancy_main().

◆ find_lsb()

int occupancy::find_lsb ( Bits occupancy)

Same as findLSB but for the whole Bits structure.

Definition at line 111 of file eevee_occupancy_lib.bsl.hh.

References find_lsb(), and findLSB.

Referenced by bit_resolve(), eevee_test_occupancy_main(), and find_lsb().

◆ occupancy_new()

Bits occupancy::occupancy_new ( )

Returns an empty structure, cleared to 0.

Definition at line 50 of file eevee_occupancy_lib.bsl.hh.

References occupancy_new().

Referenced by eevee::volume::occupancy::convert_frag(), eevee_test_occupancy_main(), and occupancy_new().

◆ resolve()

Bits occupancy::resolve ( Bits entry,
Bits exit,
int bit_count )

From a entry and exit occupancy tuple, returns the full occupancy map.

Definition at line 166 of file eevee_occupancy_lib.bsl.hh.

References bit_resolve(), resolve(), and set_flag_from_test().

Referenced by eevee_test_occupancy_main(), and resolve().

◆ set_bits_high()

Bits occupancy::set_bits_high ( Bits occupancy,
int bit_start,
int bit_count )

Set a series of bits high inside the given Bits.

Definition at line 99 of file eevee_occupancy_lib.bsl.hh.

References set_bits_high().

Referenced by eevee::volume::occupancy::convert_frag(), eevee_test_occupancy_main(), and set_bits_high().

◆ to_uint4()

uint4 occupancy::to_uint4 ( Bits occupancy)

Converts the first four occupancy words to a uint4.

Definition at line 124 of file eevee_occupancy_lib.bsl.hh.

References to_uint4().

Referenced by eevee_test_occupancy_main(), and to_uint4().