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:
authorJoe Eagar <joeedh@gmail.com>2020-03-25 04:34:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-03-25 17:45:24 +0300
commit035a3760afd23c3b28a845ba23f500931799e52b (patch)
treef7dd4df519133f0f0edc03c2e1400626efbe241a /source/blender/draw/intern/draw_hair.c
parentb4c05a9c89358fb14715009923241efdd007d3dc (diff)
Alpha hash support for hair in EEvee
This patch adds support for alpha hash for hair rendering in EEvee. Here's a comparison of with alpha hashing: {F7588610} And no alpha hashing: {F7588615} Note that this needs "soft shadows" enabled, otherwise shadows will be noisy; here's a render with soft shadows disabled: {F7588621} Reviewed By: fclem Differential Revision: https://developer.blender.org/D5221
Diffstat (limited to 'source/blender/draw/intern/draw_hair.c')
-rw-r--r--source/blender/draw/intern/draw_hair.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_hair.c b/source/blender/draw/intern/draw_hair.c
index 3055e45a4a5..048adccc4e6 100644
--- a/source/blender/draw/intern/draw_hair.c
+++ b/source/blender/draw/intern/draw_hair.c
@@ -168,6 +168,10 @@ static DRWShadingGroup *drw_shgroup_create_hair_procedural_ex(Object *object,
BLI_assert(0);
}
+ if (shgrp == NULL) {
+ return NULL;
+ }
+
/* TODO optimize this. Only bind the ones GPUMaterial needs. */
for (int i = 0; i < hair_cache->num_uv_layers; i++) {
for (int n = 0; n < MAX_LAYER_NAME_CT && hair_cache->uv_layer_names[i][n][0] != '\0'; n++) {