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:
Diffstat (limited to 'source/blender/render/extern/include/RE_bake.h')
-rw-r--r--source/blender/render/extern/include/RE_bake.h101
1 files changed, 63 insertions, 38 deletions
diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h
index f04f689d114..372defbe8db 100644
--- a/source/blender/render/extern/include/RE_bake.h
+++ b/source/blender/render/extern/include/RE_bake.h
@@ -30,68 +30,93 @@ struct Mesh;
struct Render;
typedef struct BakeImage {
- struct Image *image;
- int width;
- int height;
- size_t offset;
+ struct Image *image;
+ int width;
+ int height;
+ size_t offset;
} BakeImage;
typedef struct BakeImages {
- BakeImage *data; /* all the images of an object */
- int *lookup; /* lookup table from Material to BakeImage */
- int size;
+ BakeImage *data; /* all the images of an object */
+ int *lookup; /* lookup table from Material to BakeImage */
+ int size;
} BakeImages;
typedef struct BakePixel {
- int primitive_id, object_id;
- float uv[2];
- float du_dx, du_dy;
- float dv_dx, dv_dy;
+ int primitive_id, object_id;
+ float uv[2];
+ float du_dx, du_dy;
+ float dv_dx, dv_dy;
} BakePixel;
typedef struct BakeHighPolyData {
- struct Object *ob;
- struct Object *ob_eval;
- struct Mesh *me;
- bool is_flip_object;
+ struct Object *ob;
+ struct Object *ob_eval;
+ struct Mesh *me;
+ bool is_flip_object;
- float obmat[4][4];
- float imat[4][4];
+ float obmat[4][4];
+ float imat[4][4];
} BakeHighPolyData;
/* external_engine.c */
bool RE_bake_has_engine(struct Render *re);
-bool RE_bake_engine(
- struct Render *re, struct Depsgraph *depsgraph, struct Object *object, const int object_id, const BakePixel pixel_array[],
- const size_t num_pixels, const int depth, const eScenePassType pass_type, const int pass_filter, float result[]);
+bool RE_bake_engine(struct Render *re,
+ struct Depsgraph *depsgraph,
+ struct Object *object,
+ const int object_id,
+ const BakePixel pixel_array[],
+ const size_t num_pixels,
+ const int depth,
+ const eScenePassType pass_type,
+ const int pass_filter,
+ float result[]);
/* bake.c */
int RE_pass_depth(const eScenePassType pass_type);
-bool RE_bake_pixels_populate_from_objects(
- struct Mesh *me_low, BakePixel pixel_array_from[], BakePixel pixel_array_to[],
- BakeHighPolyData highpoly[], const int tot_highpoly, const size_t num_pixels, const bool is_custom_cage,
- const float cage_extrusion, float mat_low[4][4], float mat_cage[4][4], struct Mesh *me_cage);
-
-void RE_bake_pixels_populate(
- struct Mesh *me, struct BakePixel *pixel_array,
- const size_t num_pixels, const struct BakeImages *bake_images, const char *uv_layer);
+bool RE_bake_pixels_populate_from_objects(struct Mesh *me_low,
+ BakePixel pixel_array_from[],
+ BakePixel pixel_array_to[],
+ BakeHighPolyData highpoly[],
+ const int tot_highpoly,
+ const size_t num_pixels,
+ const bool is_custom_cage,
+ const float cage_extrusion,
+ float mat_low[4][4],
+ float mat_cage[4][4],
+ struct Mesh *me_cage);
+
+void RE_bake_pixels_populate(struct Mesh *me,
+ struct BakePixel *pixel_array,
+ const size_t num_pixels,
+ const struct BakeImages *bake_images,
+ const char *uv_layer);
void RE_bake_mask_fill(const BakePixel pixel_array[], const size_t num_pixels, char *mask);
void RE_bake_margin(struct ImBuf *ibuf, char *mask, const int margin);
-void RE_bake_normal_world_to_object(
- const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[],
- struct Object *ob, const eBakeNormalSwizzle normal_swizzle[3]);
-void RE_bake_normal_world_to_tangent(
- const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[],
- struct Mesh *me, const eBakeNormalSwizzle normal_swizzle[3], float mat[4][4]);
-void RE_bake_normal_world_to_world(
- const BakePixel pixel_array[], const size_t num_pixels, const int depth, float result[],
- const eBakeNormalSwizzle normal_swizzle[3]);
+void RE_bake_normal_world_to_object(const BakePixel pixel_array[],
+ const size_t num_pixels,
+ const int depth,
+ float result[],
+ struct Object *ob,
+ const eBakeNormalSwizzle normal_swizzle[3]);
+void RE_bake_normal_world_to_tangent(const BakePixel pixel_array[],
+ const size_t num_pixels,
+ const int depth,
+ float result[],
+ struct Mesh *me,
+ const eBakeNormalSwizzle normal_swizzle[3],
+ float mat[4][4]);
+void RE_bake_normal_world_to_world(const BakePixel pixel_array[],
+ const size_t num_pixels,
+ const int depth,
+ float result[],
+ const eBakeNormalSwizzle normal_swizzle[3]);
void RE_bake_ibuf_clear(struct Image *image, const bool is_tangent);
-#endif /* __RE_BAKE_H__ */
+#endif /* __RE_BAKE_H__ */