Eevee: Fix assert with subsurface bsdf
authorClément Foucault <foucault.clem@gmail.com>
Thu, 9 Aug 2018 14:45:56 +0000 (16:45 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Thu, 9 Aug 2018 14:46:03 +0000 (16:46 +0200)
source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c

index 3f0ba3c1c60f8431c53d9e6c5371ac060187d358..f8af125eb9ecf21fc8ef87a68370e3a88bba0238 100644 (file)
@@ -54,7 +54,7 @@ static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *node,
        if (!in[5].link)
                GPU_link(mat, "world_normals_get", &in[5].link);
 
-       GPU_material_flag_set(mat, GPU_MATFLAG_DIFFUSE);
+       GPU_material_flag_set(mat, GPU_MATFLAG_DIFFUSE | GPU_MATFLAG_SSS);
 
        if (node->sss_id == 1) {
                bNodeSocket *socket = BLI_findlink(&node->original->inputs, 2);