Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/bake.h
| Show All 21 Lines | |||||
| #include "util_progress.h" | #include "util_progress.h" | ||||
| #include "util_vector.h" | #include "util_vector.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| class BakeData { | class BakeData { | ||||
| public: | public: | ||||
| BakeData(const int object, const int tri_offset, const int num_pixels); | BakeData(const int object, const size_t tri_offset, const size_t num_pixels); | ||||
| ~BakeData(); | ~BakeData(); | ||||
| void set(int i, int prim, float uv[2], float dudx, float dudy, float dvdx, float dvdy); | void set(int i, int prim, float uv[2], float dudx, float dudy, float dvdx, float dvdy); | ||||
| int object(); | int object(); | ||||
| int size(); | size_t size(); | ||||
| uint4 data(int i); | uint4 data(int i); | ||||
| uint4 differentials(int i); | uint4 differentials(int i); | ||||
| bool is_valid(int i); | bool is_valid(int i); | ||||
| private: | private: | ||||
| int m_object; | int m_object; | ||||
| int m_tri_offset; | size_t m_tri_offset; | ||||
| int m_num_pixels; | size_t m_num_pixels; | ||||
| vector<int>m_primitive; | vector<int>m_primitive; | ||||
| vector<float>m_u; | vector<float>m_u; | ||||
| vector<float>m_v; | vector<float>m_v; | ||||
| vector<float>m_dudx; | vector<float>m_dudx; | ||||
| vector<float>m_dudy; | vector<float>m_dudy; | ||||
| vector<float>m_dvdx; | vector<float>m_dvdx; | ||||
| vector<float>m_dvdy; | vector<float>m_dvdy; | ||||
| }; | }; | ||||
| class BakeManager { | class BakeManager { | ||||
| public: | public: | ||||
| BakeManager(); | BakeManager(); | ||||
| ~BakeManager(); | ~BakeManager(); | ||||
| bool get_baking(); | bool get_baking(); | ||||
| void set_baking(const bool value); | void set_baking(const bool value); | ||||
| BakeData *init(const int object, const int tri_offset, const int num_pixels); | BakeData *init(const int object, const size_t tri_offset, const size_t num_pixels); | ||||
| bool bake(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress, ShaderEvalType shader_type, BakeData *bake_data, float result[]); | bool bake(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress, ShaderEvalType shader_type, BakeData *bake_data, float result[]); | ||||
| void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress); | void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress); | ||||
| void device_free(Device *device, DeviceScene *dscene); | void device_free(Device *device, DeviceScene *dscene); | ||||
| static bool is_light_pass(ShaderEvalType type); | static bool is_light_pass(ShaderEvalType type); | ||||
| static bool is_aa_pass(ShaderEvalType type); | static bool is_aa_pass(ShaderEvalType type); | ||||
| Show All 15 Lines | |||||