Blender
V3.3
|
#include "BLI_sys_types.h"
#include "BKE_object.h"
#include "DEG_depsgraph_query.h"
#include "eevee_private.h"
Go to the source code of this file.
Functions | |
void | eevee_light_matrix_get (const EEVEE_Light *evli, float r_mat[4][4]) |
static float | light_attenuation_radius_get (const Light *la, float light_threshold, float light_power) |
static void | light_shape_parameters_set (EEVEE_Light *evli, const Light *la, const float scale[3]) |
static float | light_shape_power_get (const Light *la, const EEVEE_Light *evli) |
static float | light_shape_power_volume_get (const Light *la, const EEVEE_Light *evli, float area_power) |
static void | eevee_light_setup (Object *ob, EEVEE_Light *evli) |
void | EEVEE_lights_cache_init (EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) |
void | EEVEE_lights_cache_add (EEVEE_ViewLayerData *sldata, Object *ob) |
void | EEVEE_lights_cache_finish (EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) |
void eevee_light_matrix_get | ( | const EEVEE_Light * | evli, |
float | r_mat[4][4] | ||
) |
Reconstruct local obmat
from EEVEE_light. (normalized).
Definition at line 16 of file eevee_lights.c.
References copy_v3_v3(), EEVEE_Light::forwardvec, negate_v3_v3(), EEVEE_Light::position, EEVEE_Light::rightvec, and EEVEE_Light::upvec.
Referenced by EEVEE_shadows_cube_setup().
|
static |
Definition at line 126 of file eevee_lights.c.
References Light::area_shape, Light::b, EEVEE_Light::color, copy_v3_v3(), blender::math::cross(), cross_v3_v3v3(), Object::data, EEVEE_Light::diff, Light::diff_fac, dot_v3v3(), DRW_context_state_get(), Scene::eevee, ELEM, Light::energy, fabsf, float(), EEVEE_Light::forwardvec, Light::g, if(), EEVEE_Light::invsqrdist, EEVEE_Light::invsqrdist_volume, LA_AREA, LA_AREA_DISK, LA_AREA_ELLIPSE, LAMPTYPE_AREA_ELLIPSE, light_attenuation_radius_get(), light_shape_parameters_set(), light_shape_power_get(), light_shape_power_volume_get(), SceneEEVEE::light_threshold, EEVEE_Light::light_type, max_ff(), max_fff(), mul_v3_fl(), negate_v3(), normalize_m4_m4_ex(), normalize_v3(), Object::obmat, EEVEE_Light::position, Light::r, EEVEE_Light::rightvec, DRWContextState::scene, EEVEE_Light::shadow_id, EEVEE_Light::spec, Light::spec_fac, square_f(), Light::type, EEVEE_Light::upvec, EEVEE_Light::volume, and Light::volume_fac.
Referenced by EEVEE_lights_cache_add().
void EEVEE_lights_cache_add | ( | EEVEE_ViewLayerData * | sldata, |
Object * | ob | ||
) |
Definition at line 200 of file eevee_lights.c.
References Object::data, eevee_light_setup(), EEVEE_shadows_cascade_add(), EEVEE_shadows_cube_add(), ELEM, Light::energy, if(), is_zero_v3(), LA_AREA, LA_LOCAL, LA_SHADOW, LA_SPOT, LA_SUN, EEVEE_LightsInfo::light_data, EEVEE_ViewLayerData::lights, MAX_LIGHT, Light::mode, EEVEE_LightsInfo::num_light, Light::r, and Light::type.
Referenced by EEVEE_cache_populate(), and EEVEE_render_cache().
void EEVEE_lights_cache_finish | ( | EEVEE_ViewLayerData * | sldata, |
EEVEE_Data * | vedata | ||
) |
Definition at line 230 of file eevee_lights.c.
References EEVEE_Light::color, EEVEE_ViewLayerData::common_data, EEVEE_StorageList::effects, GPU_uniformbuf_update(), EEVEE_CommonUniformBuffer::la_num_light, LA_SUN, EEVEE_LightsInfo::light_data, EEVEE_Light::light_type, EEVEE_ViewLayerData::light_ubo, EEVEE_ViewLayerData::lights, max_ff(), max_fff(), EEVEE_LightsInfo::num_light, EEVEE_Light::radius, sqrtf, square_f(), EEVEE_Data::stl, UNPACK3, EEVEE_Light::volume, EEVEE_EffectsInfo::volume_light_clamp, and EEVEE_Light::volume_radius.
Referenced by eevee_cache_finish(), eevee_lightbake_cache_create(), and eevee_render_to_image().
void EEVEE_lights_cache_init | ( | EEVEE_ViewLayerData * | sldata, |
EEVEE_Data * | vedata | ||
) |
Definition at line 192 of file eevee_lights.c.
References EEVEE_shadows_cache_init(), EEVEE_ViewLayerData::lights, and EEVEE_LightsInfo::num_light.
Referenced by eevee_cache_init(), eevee_lightbake_cache_create(), and EEVEE_render_cache_init().
|
static |
Definition at line 28 of file eevee_lights.c.
References Light::att_dist, e, LA_CUSTOM_ATTENUATION, max_ff(), Light::mode, and sqrtf.
Referenced by eevee_light_setup().
|
static |
Definition at line 40 of file eevee_lights.c.
References Light::area_shape, Light::area_size, Light::area_sizey, cosf, DEG2RADF, ELEM, hypotf, LA_AREA, LA_AREA_ELLIPSE, LA_AREA_RECT, LA_SPOT, LA_SUN, max_ff(), min_ff(), EEVEE_Light::radius, EEVEE_Light::sizex, EEVEE_Light::sizey, EEVEE_Light::spotblend, Light::spotblend, EEVEE_Light::spotsize, Light::spotsize, Light::sun_angle, tanf, and Light::type.
Referenced by eevee_light_setup().
|
static |
Definition at line 69 of file eevee_lights.c.
References Light::area_shape, ELEM, LA_AREA, LA_AREA_DISK, LA_AREA_ELLIPSE, LA_LOCAL, LA_SPOT, M_PI, EEVEE_Light::radius, EEVEE_Light::sizex, EEVEE_Light::sizey, and Light::type.
Referenced by eevee_light_setup().
|
static |
Definition at line 98 of file eevee_lights.c.
References blender::compositor::area(), ELEM, LA_AREA, LA_LOCAL, LA_SPOT, M_1_PI, M_PI, M_PI_2, EEVEE_Light::sizex, EEVEE_Light::sizey, sqrtf, and Light::type.
Referenced by eevee_light_setup().