Blender V4.3
blender::eevee::Precompute Class Reference

#include <eevee_precompute.hh>

Public Member Functions

 Precompute (draw::Manager &manager, PrecomputeType type, int3 table_extent)
 
 ~Precompute ()
 
template<typename T >
Vector< Tdata ()
 

Static Public Member Functions

template<typename VecT >
static void write_to_pfm (StringRefNull name, Span< VecT > pixels, int64_t n_x, int64_t n_y=1, int64_t n_z=1, int64_t n_w=1)
 
template<typename VecT >
static void write_to_header (StringRefNull name, Span< VecT > pixels, int64_t n_x, int64_t n_y=1, int64_t n_z=1, int64_t n_w=1)
 

Detailed Description

Create a look-up table of the specified type using GPU compute. Not to be used at runtime in final release. Usage example: Precompute(manager, LUT_GGX_BRDF_SPLIT_SUM, {64, 64, 1}).data<float2>()

Definition at line 26 of file eevee_precompute.hh.

Constructor & Destructor Documentation

◆ Precompute()

◆ ~Precompute()

blender::eevee::Precompute::~Precompute ( )

Definition at line 40 of file eevee_precompute.cc.

References MEM_SAFE_FREE.

Member Function Documentation

◆ data()

template<typename T >
Vector< T > blender::eevee::Precompute::data ( )
inline

Definition at line 36 of file eevee_precompute.hh.

References T.

Referenced by write_to_pfm().

◆ write_to_header()

template<typename VecT >
static void blender::eevee::Precompute::write_to_header ( StringRefNull name,
Span< VecT > pixels,
int64_t n_x,
int64_t n_y = 1,
int64_t n_z = 1,
int64_t n_w = 1 )
inlinestatic

Write a the content of a texture as a C++ header file array. The content is to be copied to eevee_lut.cc and formatted with make format.

Definition at line 98 of file eevee_precompute.hh.

References file, w(), y, and z().

◆ write_to_pfm()

template<typename VecT >
static void blender::eevee::Precompute::write_to_pfm ( StringRefNull name,
Span< VecT > pixels,
int64_t n_x,
int64_t n_y = 1,
int64_t n_z = 1,
int64_t n_w = 1 )
inlinestatic

Write a the content of a texture to a PFM image file for inspection. OpenGL texture coordinate convention with Y up is respected.

Definition at line 51 of file eevee_precompute.hh.

References blender::draw::BLI_STATIC_ASSERT(), data(), and file.


The documentation for this class was generated from the following files: