Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/extern/include/RE_bake.h
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
| typedef struct BakeImages { | typedef struct BakeImages { | ||||
| BakeImage *data; /* all the images of an object */ | BakeImage *data; /* all the images of an object */ | ||||
| int *lookup; /* lookup table from Material to BakeImage */ | int *lookup; /* lookup table from Material to BakeImage */ | ||||
| int size; | int size; | ||||
| } BakeImages; | } BakeImages; | ||||
| typedef struct BakePixel { | typedef struct BakePixel { | ||||
| int primitive_id; | int primitive_id, object_id; | ||||
| float uv[2]; | float uv[2]; | ||||
| float du_dx, du_dy; | float du_dx, du_dy; | ||||
| float dv_dx, dv_dy; | float dv_dx, dv_dy; | ||||
| } BakePixel; | } BakePixel; | ||||
| typedef struct BakeHighPolyData { | typedef struct BakeHighPolyData { | ||||
| struct BakePixel *pixel_array; | |||||
| struct Object *ob; | struct Object *ob; | ||||
| struct ModifierData *tri_mod; | struct ModifierData *tri_mod; | ||||
| struct Mesh *me; | struct Mesh *me; | ||||
| char restrict_flag; | char restrict_flag; | ||||
| float obmat[4][4]; | float obmat[4][4]; | ||||
| float imat[4][4]; | float imat[4][4]; | ||||
| float rotmat[4][4]; | float rotmat[4][4]; | ||||
| } BakeHighPolyData; | } BakeHighPolyData; | ||||
| /* external_engine.c */ | /* external_engine.c */ | ||||
| bool RE_bake_has_engine(struct Render *re); | bool RE_bake_has_engine(struct Render *re); | ||||
| void RE_bake_object_id_set(struct Render *re, int object_id); | |||||
| int RE_bake_object_id_get(struct Render *re); | |||||
| bool RE_bake_engine( | bool RE_bake_engine( | ||||
| struct Render *re, struct Object *object, const BakePixel pixel_array[], | struct Render *re, struct Object *object, const BakePixel pixel_array[], | ||||
| const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); | const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); | ||||
| /* bake.c */ | /* bake.c */ | ||||
| int RE_pass_depth(const ScenePassType pass_type); | int RE_pass_depth(const ScenePassType pass_type); | ||||
| bool RE_bake_internal( | bool RE_bake_internal( | ||||
| struct Render *re, struct Object *object, const BakePixel pixel_array[], | struct Render *re, struct Object *object, const BakePixel pixel_array[], | ||||
| const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); | const size_t num_pixels, const int depth, const ScenePassType pass_type, float result[]); | ||||
| bool RE_bake_pixels_populate_from_objects( | bool RE_bake_pixels_populate_from_objects( | ||||
| struct Mesh *me_low, BakePixel pixel_array_from[], | 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, | 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); | const float cage_extrusion, float mat_low[4][4], float mat_cage[4][4], struct Mesh *me_cage); | ||||
| void RE_bake_pixels_populate( | void RE_bake_pixels_populate( | ||||
| struct Mesh *me, struct BakePixel *pixel_array, | struct Mesh *me, struct BakePixel *pixel_array, | ||||
| const size_t num_pixels, const struct BakeImages *bake_images, const char *uv_layer); | 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_mask_fill(const BakePixel pixel_array[], const size_t num_pixels, char *mask); | ||||
| Show All 16 Lines | |||||