diff options
author | Phoenix Katsch <phoenixkatsch> | 2022-10-03 20:26:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-10-03 22:59:31 +0300 |
commit | b475506cfbd35fe2d356ce43a6a3e1f93bd6602b (patch) | |
tree | 030ef0c4eafbb9443ae5c6ed9b8d105dd5a82974 /source/blender/makesdna | |
parent | af51e4b41c9e591bd0640623d5314508f8e6a8ea (diff) |
Cycles: add option to bake specular from active camera viewpoint
Previously it would bake viewed from above the surface. The new option can be
useful when the baked result is meant to be viewed from a fixed viewpoint or
with limited camera motion.
Some effort is made to give a continuous reflection on parts of the surface
invisible to the camera, but this is necessarily only a rough approximation.
Differential Revision: https://developer.blender.org/D15921
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 80b1049ca23..2db81693f51 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -559,7 +559,8 @@ typedef struct BakeData { char target; char save_mode; char margin_type; - char _pad[5]; + char view_from; + char _pad[4]; struct Object *cage_object; } BakeData; @@ -592,6 +593,12 @@ typedef enum eBakeSaveMode { R_BAKE_SAVE_EXTERNAL = 1, } eBakeSaveMode; +/** #BakeData.view_from (char) */ +typedef enum eBakeViewFrom { + R_BAKE_VIEW_FROM_ABOVE_SURFACE = 0, + R_BAKE_VIEW_FROM_ACTIVE_CAMERA = 1, +} eBakeViewFrom; + /** #BakeData.pass_filter */ typedef enum eBakePassFilter { R_BAKE_PASS_FILTER_NONE = 0, |