Fix T49324: True displacement crashes when shader returns NaN
This commit is contained in:
parent
1f96dd2e0b
commit
ef8ad66aa2
Notes:
blender-bot
2023-02-14 11:07:28 +01:00
Referenced by issue #49324, Displacement > True crash blender in this file
|
@ -169,6 +169,8 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me
|
|||
if(!done[t.v[j]]) {
|
||||
done[t.v[j]] = true;
|
||||
float3 off = float4_to_float3(offset[k++]);
|
||||
/* Avoid illegal vertex coordinates. */
|
||||
off = ensure_finite3(off);
|
||||
mesh->verts[t.v[j]] += off;
|
||||
if(attr_mP != NULL) {
|
||||
for(int step = 0; step < mesh->motion_steps - 1; step++) {
|
||||
|
|
Loading…
Reference in New Issue