Blender V5.3
eevee_light_lib.bsl.hh File Reference

Go to the source code of this file.

Classes

struct  LightVector
struct  LightShape

Namespaces

namespace  eevee
namespace  eevee::light

Macros

#define LIGHT_ATTENUATION_THRESHOLD   1e-6f

Functions

float eevee::light::power_get (LightData light, LightingType type)
bool eevee::light::light_linking_affects_receiver (uint2 light_set_membership, uchar receiver_light_set)
Light Functions
float3 light_world_to_local_direction (LightData light, float3 L)
float3 light_world_to_local_point (LightData light, float3 point)
float light_influence_attenuation (float dist, float inv_sqr_influence)
float light_spot_attenuation (LightData light, float3 L)
float light_attenuation_common (LightData light, const bool is_directional, float3 L)
float light_shape_radius (LightData light)
float light_attenuation_facing (LightData light, float3 L, float distance_to_light, float3 Ng, const bool is_transmission)
float light_attenuation_surface (LightData light, const bool is_directional, LightVector lv)
float light_attenuation_volume (LightData light, const bool is_directional, LightVector lv)
float light_point_light (LightData light, const bool is_directional, LightVector lv)
float light_sphere_disk_radius (float sphere_radius, float distance_to_sphere)

Macro Definition Documentation

◆ LIGHT_ATTENUATION_THRESHOLD

Function Documentation

◆ light_attenuation_common()

float light_attenuation_common ( LightData light,
const bool is_directional,
float3 L )

◆ light_attenuation_facing()

float light_attenuation_facing ( LightData light,
float3 L,
float distance_to_light,
float3 Ng,
const bool is_transmission )

Fade light influence when surface is not facing the light. This is used in thickness from shadow. Note: Ng is ideally the geometric normal.

Definition at line 122 of file eevee_light_lib.bsl.hh.

References dot(), L, light_attenuation_facing(), light_shape_radius(), and saturate.

Referenced by eevee::thickness::FromShadowEvalCtx::eval(), and light_attenuation_facing().

◆ light_attenuation_surface()

◆ light_attenuation_volume()

float light_attenuation_volume ( LightData light,
const bool is_directional,
LightVector lv )

◆ light_influence_attenuation()

float light_influence_attenuation ( float dist,
float inv_sqr_influence )

◆ light_point_light()

float light_point_light ( LightData light,
const bool is_directional,
LightVector lv )

◆ light_shape_radius()

float light_shape_radius ( LightData light)

Definition at line 106 of file eevee_light_lib.bsl.hh.

References length(), and light_shape_radius().

Referenced by light_attenuation_facing(), and light_shape_radius().

◆ light_sphere_disk_radius()

float light_sphere_disk_radius ( float sphere_radius,
float distance_to_sphere )

Return the radius of the disk at the sphere origin spanning the same solid angle as the sphere from a given distance. Assume distance_to_sphere > sphere_radius, otherwise return almost infinite radius.

Definition at line 183 of file eevee_light_lib.bsl.hh.

References inversesqrt(), light_sphere_disk_radius(), max, and square().

Referenced by LightShape::get(), light_sphere_disk_radius(), eevee::shadow_ray_generate_punctual(), and eevee::light::shape_display_light_position_get().

◆ light_spot_attenuation()

◆ light_world_to_local_direction()

◆ light_world_to_local_point()