GPUMaterial: Fix non finished material status if shader has no output.

This wasn't producing any issue for now but it's better to make things clean.
This commit is contained in:
Clément Foucault 2018-03-13 03:49:04 +01:00
parent 8b399d3148
commit 0acccda4a4
1 changed files with 3 additions and 0 deletions

View File

@ -2572,6 +2572,9 @@ void GPU_material_generate_pass(
mat, mat->outlink, &mat->attribs, &mat->nodes, &mat->inputs, vert_code, geom_code, frag_lib, defines);
mat->status = (mat->pass) ? GPU_MAT_SUCCESS : GPU_MAT_FAILED;
}
else {
mat->status = GPU_MAT_FAILED;
}
}
GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma, bool use_opensubdiv)