blender/intern/cycles/scene/bake.h
Phoenix Katsch b475506cfb 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
2022-10-03 21:59:31 +02:00

41 lines
770 B
C++

/* SPDX-License-Identifier: Apache-2.0
* Copyright 2011-2022 Blender Foundation */
#ifndef __BAKE_H__
#define __BAKE_H__
#include "device/device.h"
#include "scene/scene.h"
#include "util/progress.h"
#include "util/vector.h"
CCL_NAMESPACE_BEGIN
class BakeManager {
public:
BakeManager();
~BakeManager();
void set(Scene *scene, const std::string &object_name);
bool get_baking() const;
void set_use_camera(bool use_camera);
void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress);
void device_free(Device *device, DeviceScene *dscene);
void tag_update();
bool need_update() const;
private:
bool need_update_;
std::string object_name;
bool use_camera_;
};
CCL_NAMESPACE_END
#endif /* __BAKE_H__ */