diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-27 02:46:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-27 03:03:16 +0300 |
commit | 3051e2f4ae8fd3e72a43dd1e5d40893d0efec500 (patch) | |
tree | 6de62ee531c71705a8d86592770d26f8ecb75d1f /source/blender/draw | |
parent | ce104ca89643c4b0e6358fd22a2b056ecd603e62 (diff) |
DNA: rename Lamp -> Light
- BKE_lamp -> BKE_light
- Main.lamp -> light
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_data.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lights.c | 26 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 4 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_data.c b/source/blender/draw/engines/eevee/eevee_data.c index f9bfa8e711e..dae1e3e8930 100644 --- a/source/blender/draw/engines/eevee/eevee_data.c +++ b/source/blender/draw/engines/eevee/eevee_data.c @@ -151,7 +151,7 @@ EEVEE_LightProbeEngineData *EEVEE_lightprobe_data_ensure(Object *ob) NULL); } -/* Lamp data. */ +/* Light data. */ static void eevee_lamp_data_init(DrawData *dd) { diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c index 07b5ffcb9d3..34a653c8f9c 100644 --- a/source/blender/draw/engines/eevee/eevee_lights.c +++ b/source/blender/draw/engines/eevee/eevee_lights.c @@ -55,7 +55,7 @@ extern char datatoc_concentric_samples_lib_glsl[]; /* Prototypes */ static void eevee_light_setup(Object *ob, EEVEE_Light *evli); -static float light_attenuation_radius_get(Lamp *la, float light_threshold); +static float light_attenuation_radius_get(Light *la, float light_threshold); /* *********** LIGHT BITS *********** */ static void lightbits_set_single(EEVEE_LightBits *bitf, uint idx, bool val) @@ -342,7 +342,7 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob) printf("Too many lights in the scene !!!\n"); } else { - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; EEVEE_Light *evli = linfo->light_data + linfo->num_light; eevee_light_setup(ob, evli); @@ -591,7 +591,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) EEVEE_lights_update(sldata, vedata); } -float light_attenuation_radius_get(Lamp *la, float light_threshold) +float light_attenuation_radius_get(Light *la, float light_threshold) { if (la->mode & LA_CUSTOM_ATTENUATION) { return la->att_dist; @@ -607,7 +607,7 @@ float light_attenuation_radius_get(Lamp *la, float light_threshold) return distance; } -static void light_shape_parameters_set(EEVEE_Light *evli, const Lamp *la, float scale[3]) +static void light_shape_parameters_set(EEVEE_Light *evli, const Light *la, float scale[3]) { if (la->type == LA_SPOT) { /* Spot size & blend */ @@ -631,7 +631,7 @@ static void light_shape_parameters_set(EEVEE_Light *evli, const Lamp *la, float } } -static float light_shape_power_get(const Lamp *la, const EEVEE_Light *evli) +static float light_shape_power_get(const Light *la, const EEVEE_Light *evli) { float power; /* Make illumination power constant */ @@ -662,7 +662,7 @@ static float light_shape_power_get(const Lamp *la, const EEVEE_Light *evli) /* Update buffer with lamp data */ static void eevee_light_setup(Object *ob, EEVEE_Light *evli) { - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; float mat[4][4], scale[3], power, att_radius; const DRWContextState *draw_ctx = DRW_context_state_get(); @@ -695,7 +695,7 @@ static void eevee_light_setup(Object *ob, EEVEE_Light *evli) light_shape_parameters_set(evli, la, scale); - /* Lamp Type */ + /* Light Type */ evli->lamptype = (float)la->type; if ((la->type == LA_AREA) && ELEM(la->area_shape, LA_AREA_DISK, LA_AREA_ELLIPSE)) { evli->lamptype = LAMPTYPE_AREA_ELLIPSE; @@ -777,7 +777,7 @@ static void sample_ellipse( static void shadow_cube_random_position_set( - EEVEE_Light *evli, Lamp *la, + EEVEE_Light *evli, Light *la, int sample_ofs, float ws_sample_pos[3]) { @@ -815,7 +815,7 @@ static void eevee_shadow_cube_setup(Object *ob, EEVEE_LampsInfo *linfo, EEVEE_La EEVEE_Light *evli = linfo->light_data + sh_data->light_id; EEVEE_Shadow *ubo_data = linfo->shadow_data + sh_data->shadow_id; EEVEE_ShadowCube *cube_data = linfo->shadow_cube_data + sh_data->cube_id; - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; copy_v3_v3(cube_data->position, ob->obmat[3]); @@ -912,7 +912,7 @@ static void eevee_shadow_cascade_setup( Object *ob, EEVEE_LampsInfo *linfo, EEVEE_LampEngineData *led, DRWMatrixState *saved_mats, float view_near, float view_far, int sample_ofs) { - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; /* Camera Matrices */ float (*persinv)[4] = saved_mats->mat[DRW_MAT_PERSINV]; @@ -1231,7 +1231,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) /* Precompute all shadow/view test before rendering and trashing the culling cache. */ bool cube_visible[MAX_SHADOW_CUBE]; for (i = 0; (ob = linfo->shadow_cube_ref[i]) && (i < MAX_SHADOW_CUBE); i++) { - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; BoundSphere bsphere = { .center = {ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]}, .radius = light_attenuation_radius_get(la, light_threshold), @@ -1259,7 +1259,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) /* Render each shadow to one layer of the array */ for (i = 0; (ob = linfo->shadow_cube_ref[i]) && (i < MAX_SHADOW_CUBE); i++) { EEVEE_LampEngineData *led = EEVEE_lamp_data_ensure(ob); - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; if (!led->need_update || !cube_visible[i]) { continue; @@ -1372,7 +1372,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) } EEVEE_LampEngineData *led = EEVEE_lamp_data_ensure(ob); - Lamp *la = (Lamp *)ob->data; + Light *la = (Light *)ob->data; EEVEE_ShadowCascadeData *evscd = &led->data.scad; EEVEE_ShadowRender *srd = &linfo->shadow_render_data; diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index dde3dfb0f56..a5695fa3a4c 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -369,7 +369,7 @@ typedef struct EEVEE_ShadowCube { } EEVEE_ShadowCube; typedef struct EEVEE_ShadowCascade { - /* World->Lamp->NDC->Tex : used for sampling the shadow map. */ + /* World->Light->NDC->Tex : used for sampling the shadow map. */ float shadowmat[MAX_CASCADE_NUM][4][4]; float split_start[4]; float split_end[4]; @@ -727,7 +727,7 @@ typedef struct EEVEE_ShadowCubeData { typedef struct EEVEE_ShadowCascadeData { short light_id, shadow_id, cascade_id, layer_id; - /* World->Lamp->NDC : used for rendering the shadow map. */ + /* World->Light->NDC : used for rendering the shadow map. */ float viewprojmat[MAX_CASCADE_NUM][4][4]; float projmat[MAX_CASCADE_NUM][4][4]; float viewmat[4][4], viewinv[4][4]; diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index c0c290e1056..4b874425d7a 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1501,7 +1501,7 @@ static void DRW_shgroup_mball_handles(OBJECT_ShadingGroupList *sgl, Object *ob, static void DRW_shgroup_lamp(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLayer *view_layer) { - Lamp *la = ob->data; + Light *la = ob->data; float *color; int theme_id = DRW_object_wire_theme_get(ob, view_layer, &color); static float zero = 0.0f; |