diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-07-11 14:48:14 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-07-11 14:48:14 +0400 |
commit | 54cd0cf56dde84df9e8e1d1c473002873698e61e (patch) | |
tree | 46a3614877288b41aa14e15425c4b2f0121a2fd9 /source/blender/radiosity/extern | |
parent | 9cb84a662e0492565ec65770753d421911494c32 (diff) |
This commit fixes radiosity to correctly preserve and subdivide UV
coordinates.
Known problem: Pin status bleeds a bit, so new subdivided UVs around
points that were original pinned can end up pinned in the end. Could be
fixed, or could just drop pinned status entirely.
Also, when gathering meshes, it doesn't add materials twice, so it's harder to bust the 16 materials limit.
Diffstat (limited to 'source/blender/radiosity/extern')
-rw-r--r-- | source/blender/radiosity/extern/include/radio.h | 3 | ||||
-rw-r--r-- | source/blender/radiosity/extern/include/radio_types.h | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/radiosity/extern/include/radio.h b/source/blender/radiosity/extern/include/radio.h index 2f4e1ff5408..aebfaaaccc0 100644 --- a/source/blender/radiosity/extern/include/radio.h +++ b/source/blender/radiosity/extern/include/radio.h @@ -133,7 +133,8 @@ void addaccuweight(register char *z, register char *t, int w); void triaweight(Face *face, int *w1, int *w2, int *w3); void init_face_tab(void); Face *addface(void); -void makeface(float *v1, float *v2, float *v3, float *v4, RNode *rn); +Face *makeface(float *v1, float *v2, float *v3, float *v4, RNode *rn, short hasUV); +void dofaceuv(Face *face, float uvs[8][2], short flag1, short flag2, short flag3, short flag4); void anchorQuadface(RNode *rn, float *v1, float *v2, float *v3, float *v4, int flag); void anchorTriface(RNode *rn, float *v1, float *v2, float *v3, int flag); float *findmiddlevertex(RNode *node, RNode *nb, float *v1, float *v2); diff --git a/source/blender/radiosity/extern/include/radio_types.h b/source/blender/radiosity/extern/include/radio_types.h index 910b50e4373..442e00cb8ed 100644 --- a/source/blender/radiosity/extern/include/radio_types.h +++ b/source/blender/radiosity/extern/include/radio_types.h @@ -73,7 +73,7 @@ typedef struct RadView { #define RAD_TWOSIDED 16 -typedef struct RNode { /* length: 76 */ +typedef struct RNode { /* length: 104 */ struct RNode *down1, *down2, *up; struct RNode *ed1, *ed2, *ed3, *ed4; struct RPatch *par; @@ -85,6 +85,8 @@ typedef struct RNode { /* length: 76 */ float totrad[3], area; unsigned int col; + float uv[4][2]; /* when you change this: also do function set_correct_uv in editmesh.c, and there are more locations that use the size of this part */ + struct TFace *tface; } RNode; @@ -100,9 +102,11 @@ typedef struct Elem { /* length: 44 */ } Elem; -typedef struct Face { /* length: 24 */ +typedef struct Face { /* length: 52 */ float *v1, *v2, *v3, *v4; unsigned int col, matindex; + float uv[4][2]; /* when you change this: also do function set_correct_uv in editmesh.c, and there are more locations that use the size of this part */ + struct TFace *tface; } Face; /* rp->f1 */ |