Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-01-17 20:09:47 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-01-18 14:29:53 +0300
commitfb053ae2e5676e61b7b10d5ee730ee24fd13fa46 (patch)
treebb99df7bda3d65d6e56259ec7e2be8d3f3f72f89 /source/blender/blenkernel/BKE_subdiv.h
parentcb5302f962185b827e8c8b40f7a10dceebe310f9 (diff)
Multires: Correct averaging
Before that only normal component was averaged, which is not really correct. Unfortunately, the new code is somewhat slower due to more involved math to deal properly with non-quad faces, but the plan is to move averaging from runtime to edit time, This means, that mdisps will always be continuous around the edges and no averaging on every frame change of animated character will be needed.
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv.h')
-rw-r--r--source/blender/blenkernel/BKE_subdiv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h
index 28efb159b09..73470b15c61 100644
--- a/source/blender/blenkernel/BKE_subdiv.h
+++ b/source/blender/blenkernel/BKE_subdiv.h
@@ -246,6 +246,11 @@ BLI_INLINE void BKE_subdiv_ptex_face_uv_to_grid_uv(
const float ptex_u, const float ptex_v,
float *r_grid_u, float *r_grid_v);
+/* Onverse of above. */
+BLI_INLINE void BKE_subdiv_grid_uv_to_ptex_face_uv(
+ const float grid_u, const float grid_v,
+ float *r_ptex_u, float *r_ptex_v);
+
/* For a given subdivision level (which is NOT refinement level) get size of
* CCG grid (number of grid points on a side).
*/