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:
authorMai Lavelle <mai.lavelle@gmail.com>2016-07-17 02:42:28 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2016-07-29 10:36:30 +0300
commitc96ae81160ad1a943fafaca44a7d5e97c2d7a0d7 (patch)
tree83905d5a6bf2583f44d9dcf90410b5a0c024822c /intern/cycles/subd/subd_dice.h
parentf74645578c9dd38c2543d1211b779a019363b04f (diff)
Cycles microdisplacement: ngons and attributes for subdivision meshes
This adds support for ngons and attributes on subdivision meshes. Ngons are needed for proper attribute interpolation as well as correct Catmull-Clark subdivision. Several changes are made to achieve this: - new primitive `SubdFace` added to `Mesh` - 3 more textures are used to store info on patches from subd meshes - Blender export uses loop interface instead of tessface for subd meshes - `Attribute` class is updated with a simplified way to pass primitive counts around and to support ngons. - extra points for ngons are generated for O(1) attribute interpolation - curves are temporally disabled on subd meshes to avoid various bugs with implementation - old unneeded code is removed from `subd/` - various fixes and improvements Reviewed By: brecht Differential Revision: https://developer.blender.org/D2108
Diffstat (limited to 'intern/cycles/subd/subd_dice.h')
-rw-r--r--intern/cycles/subd/subd_dice.h46
1 files changed, 1 insertions, 45 deletions
diff --git a/intern/cycles/subd/subd_dice.h b/intern/cycles/subd/subd_dice.h
index 85bd0ea28f0..3002ec780e8 100644
--- a/intern/cycles/subd/subd_dice.h
+++ b/intern/cycles/subd/subd_dice.h
@@ -33,8 +33,6 @@ class Patch;
struct SubdParams {
Mesh *mesh;
- int shader;
- bool smooth;
bool ptex;
int test_steps;
@@ -44,11 +42,9 @@ struct SubdParams {
Camera *camera;
Transform objecttoworld;
- SubdParams(Mesh *mesh_, int shader_, bool smooth_ = true, bool ptex_ = false)
+ SubdParams(Mesh *mesh_, bool ptex_ = false)
{
mesh = mesh_;
- shader = shader_;
- smooth = smooth_;
ptex = ptex_;
test_steps = 3;
@@ -136,46 +132,6 @@ public:
void dice(SubPatch& sub, EdgeFactors& ef);
};
-/* Triangle EdgeDice
- *
- * Edge tessellation factors and subpatch coordinates are as follows:
- *
- * Pw
- * /\
- * tv / \ tu
- * / \
- * / \
- * Pu -------- Pv
- * tw
- */
-
-class TriangleDice : public EdgeDice {
-public:
- struct SubPatch {
- Patch *patch;
-
- float2 Pu;
- float2 Pv;
- float2 Pw;
- };
-
- struct EdgeFactors {
- int tu;
- int tv;
- int tw;
- };
-
- explicit TriangleDice(const SubdParams& params);
-
- void reserve(EdgeFactors& ef, int M);
-
- float2 map_uv(SubPatch& sub, float2 uv);
- int add_vert(SubPatch& sub, float2 uv);
-
- void add_grid(SubPatch& sub, EdgeFactors& ef, int M);
- void dice(SubPatch& sub, EdgeFactors& ef);
-};
-
CCL_NAMESPACE_END
#endif /* __SUBD_DICE_H__ */