Blender V5.3
SphericalHarmonicL1< T > Struct Template Reference

#include <gpu_shader_math_spherical_harmonics.bsl.hh>

Public Member Functions

void encode_signal_sample (float3 direction, T amplitude)
T evaluate (float3 direction) const
T evaluate_lambert (float3 N) const

Public Attributes

spherical_harmonics::BandL0< T > L0
spherical_harmonics::BandL1< T > L1

Detailed Description

template<typename T>
struct SphericalHarmonicL1< T >

Definition at line 321 of file gpu_shader_math_spherical_harmonics.bsl.hh.

Member Function Documentation

◆ encode_signal_sample()

◆ evaluate()

template<typename T>
T SphericalHarmonicL1< T >::evaluate ( float3 direction) const
inline

◆ evaluate_lambert()

template<typename T>
T SphericalHarmonicL1< T >::evaluate_lambert ( float3 N) const
inline

Convolve a spherical harmonic encoded irradiance signal as a lambertian reflection. Returns the lambertian radiance (cosine lobe divided by PI) so the coefficients simplify to 1, 2/3 and 1/4. See this reference for more explanation: https://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/

Definition at line 346 of file gpu_shader_math_spherical_harmonics.bsl.hh.

References spherical_harmonics::BandL0< T >::evaluate(), spherical_harmonics::BandL1< T >::evaluate(), L0, L1, max, N, and T.

Referenced by eevee::LightprobeRenderData::eval(), eevee::LightprobeRenderData::eval(), eevee::lightprobe::volume::display::frag_main(), eevee::deferred::planar_eval_frag(), eevee::fast_gi::resolve(), eevee::deferred::sphere_eval_frag(), and eevee::surf_world().

Member Data Documentation

◆ L0

◆ L1


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