Commit: d5a417c8dccf8ef5ae5472d58ba075535bc84237 Author: Nicholas Bishop Date: Thu Jan 15 17:22:35 2015 +0100 Branches: cycles-ptex-06 https://developer.blender.org/rBd5a417c8dccf8ef5ae5472d58ba075535bc84237
Comment cleanups =================================================================== M intern/cycles/render/image.cpp =================================================================== diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp index bccc93c..bfeaa15 100644 --- a/intern/cycles/render/image.cpp +++ b/intern/cycles/render/image.cpp @@ -238,9 +238,10 @@ static void ptex_copy_face_pixels(PtexPackedTexture &output, if (face_id != 1) ;//return; + /* Copy the whole face at highest resolution */ r->getData(face_id, output.texels.data() + dst_offset, dst_stride); - // Fill in borders + /* Add borders by copying data from adjacent faces */ const Ptex::FaceInfo &info = r->getFaceInfo(face_id); const bool is_subface = info.isSubface(); const int x_inc[4] = {bpt, 0, -bpt, 0}; @@ -248,7 +249,6 @@ static void ptex_copy_face_pixels(PtexPackedTexture &output, dst_offset = ((elem.co[1] - 1) * output.width + (elem.co[0] - 1)) * bpt; - //PtexBorderIter iter(output, r, face_id, dst_stride); for (int i = 0; i < 4; i++) { /* In general there is only one adjacent face, but when a quad * is adjacent to a non-quad there are two adjacent subfaces */ @@ -275,10 +275,6 @@ static void ptex_copy_face_pixels(PtexPackedTexture &output, adj_edge[1] = (Ptex::EdgeId)((adj_edge[1] + 3) % 4); } - // TODO: handle faces adjacent to subfaces correctly - - // TODO: handle subfaces adjacent to faces correctly - // TODO: handle corners correctly dst_offset += x_inc[i] + y_inc[i]; @@ -290,6 +286,8 @@ static void ptex_copy_face_pixels(PtexPackedTexture &output, // TODO, all kinds of uglyness here + + if (no_adj) { PtexEdgeIter iter(*face_data[0], adj_edge[0], side_res, false); for (int j = 0; j < side_res; j++) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs