diff options
Diffstat (limited to 'intern/cycles/render/mesh_displace.cpp')
-rw-r--r-- | intern/cycles/render/mesh_displace.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/intern/cycles/render/mesh_displace.cpp b/intern/cycles/render/mesh_displace.cpp index f20bc73a542..159705cbb6a 100644 --- a/intern/cycles/render/mesh_displace.cpp +++ b/intern/cycles/render/mesh_displace.cpp @@ -79,18 +79,20 @@ bool MeshManager::displace(Device *device, DeviceScene *dscene, Scene *scene, Me int object = ~object_index; int prim = mesh->tri_offset + i; float u, v; - - if(j == 0) { - u = 1.0f; - v = 0.0f; - } - else if(j == 1) { - u = 0.0f; - v = 1.0f; - } - else { - u = 0.0f; - v = 0.0f; + + switch (j) { + case 0: + u = 1.0f; + v = 0.0f; + break; + case 1: + u = 0.0f; + v = 1.0f; + break; + default: + u = 0.0f; + v = 0.0f; + break; } /* back */ |