Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-06-02 13:06:24 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-06-02 22:16:40 +0300
commit1de73fc6c36b88dfa3718746c9c8f999be2ae737 (patch)
treea2ac0519fb73ee0226224203f7b5cc8a7f99e4fd /source/blender/draw/engines/eevee/eevee_engine.c
parent08a2c5f2249c89a07cc6c37b28d13a611283ef73 (diff)
Eevee: Hair: Make hairs visible even if the show emitter option is disabled.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_engine.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_engine.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c
index 9147a332764..c922ee61700 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -129,38 +129,40 @@ static void eevee_cache_populate(void *vedata, Object *ob)
const DRWContextState *draw_ctx = DRW_context_state_get();
const bool is_active = (ob == draw_ctx->obact);
+ bool cast_shadow = false;
+
if (is_active) {
if (DRW_object_is_mode_shade(ob) == true) {
return;
}
}
- if (DRW_check_object_visible_within_active_context(ob) == false) {
- return;
+ if (ob->base_flag & BASE_VISIBLED) {
+ EEVEE_hair_cache_populate(vedata, sldata, ob, &cast_shadow);
}
- if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT)) {
- bool cast_shadow;
-
- EEVEE_materials_cache_populate(vedata, sldata, ob, &cast_shadow);
-
- if (cast_shadow) {
- EEVEE_lights_cache_shcaster_object_add(sldata, ob);
+ if (DRW_check_object_visible_within_active_context(ob)) {
+ if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT)) {
+ EEVEE_materials_cache_populate(vedata, sldata, ob, &cast_shadow);
}
- }
- else if (!USE_SCENE_LIGHT(draw_ctx->v3d)) {
- /* do not add any scene light sources to the cache */
- }
- else if (ob->type == OB_LIGHTPROBE) {
- if ((ob->base_flag & BASE_FROMDUPLI) != 0) {
- /* TODO: Special case for dupli objects because we cannot save the object pointer. */
+ else if (!USE_SCENE_LIGHT(draw_ctx->v3d)) {
+ /* do not add any scene light sources to the cache */
+ }
+ else if (ob->type == OB_LIGHTPROBE) {
+ if ((ob->base_flag & BASE_FROMDUPLI) != 0) {
+ /* TODO: Special case for dupli objects because we cannot save the object pointer. */
+ }
+ else {
+ EEVEE_lightprobes_cache_add(sldata, ob);
+ }
}
- else {
- EEVEE_lightprobes_cache_add(sldata, ob);
+ else if (ob->type == OB_LAMP) {
+ EEVEE_lights_cache_add(sldata, ob);
}
}
- else if (ob->type == OB_LAMP) {
- EEVEE_lights_cache_add(sldata, ob);
+
+ if (cast_shadow) {
+ EEVEE_lights_cache_shcaster_object_add(sldata, ob);
}
}