diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-24 13:14:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-24 13:14:51 +0300 |
commit | 81f64312d29260fded00da75ddb0f3da730585b0 (patch) | |
tree | a69cccb76faeb03d02f8f273f9776c3c5f706697 /source/blender | |
parent | 4269c5690412975291cddf420e0a9aafa1bb8e5f (diff) |
Fix T46226: Bake normals multi-res crash
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/multires_bake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/multires_bake.c b/source/blender/render/intern/source/multires_bake.c index 0223f76f869..dcc33b99742 100644 --- a/source/blender/render/intern/source/multires_bake.c +++ b/source/blender/render/intern/source/multires_bake.c @@ -612,7 +612,7 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm, int col = cell_index % polys_per_grid_side; /* S is the vertex whose grid we are examining */ - S = loc_cage_poly_offs / (polys_per_grid_side * polys_per_grid_side); + S = poly_index / (1 << (2 * (lvl - 1))) - grid_offset[cage_face_index]; /* get offset of grid data for original cage face */ g_index = grid_offset[cage_face_index]; |