Fix T49252: Crash when image textures used with true displacement
This commit is contained in:
		@@ -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;
 | 
			
		||||
					}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user