Fix T49252: Crash when image textures used with true displacement

This commit is contained in:
Mai Lavelle 2016-09-05 12:51:30 -04:00
parent 718bf8fd9d
commit 56d2f4c20a
Notes: blender-bot 2023-02-14 07:45:37 +01:00
Referenced by issue #49282, Cycles displacement and image textures
Referenced by issue #49252, Microdisplacement; Very recent builds crash when image textures are used (when the mode is set to 'true')
Referenced by issue #48847, I can't use the Keyboard Shortcuts "]" (select: "After Current Frames") in Dope Sheet Editor or Graph Editor
1 changed files with 2 additions and 2 deletions

View File

@ -1650,10 +1650,10 @@ void MeshManager::device_update_displacement_images(Device *device,
foreach(Mesh *mesh, scene->meshes) {
if(mesh->need_update) {
foreach(Shader *shader, mesh->used_shaders) {
if(shader->graph_bump == NULL) {
if(!shader->has_displacement || shader->displacement_method == DISPLACE_BUMP) {
continue;
}
foreach(ShaderNode* node, shader->graph_bump->nodes) {
foreach(ShaderNode* node, shader->graph->nodes) {
if(node->special_type != SHADER_SPECIAL_TYPE_IMAGE_SLOT) {
continue;
}