ad35453cd1
Light groups are a type of pass that only contains lighting from a subset of light sources. They are created in the View layer, and light sources (lamps, objects with emissive materials and/or the environment) can be assigned to a group. Currently, each light group ends up generating its own version of the Combined pass. In the future, additional types of passes (e.g. shadowcatcher) might be getting their own per-lightgroup versions. The lightgroup creation and assignment is not Cycles-specific, so Eevee or external render engines could make use of it in the future. Note that Lightgroups are identified by their name - therefore, the name of the Lightgroup in the View Layer and the name that's set in an object's settings must match for it to be included. Currently, changing a Lightgroup's name does not update objects - this is planned for the future, along with other features such as denoising for light groups and viewing them in preview renders. Original patch by Alex Fuller (@mistaed), with some polishing by Lukas Stockner (@lukasstockner97). Differential Revision: https://developer.blender.org/D12871
49 lines
953 B
C++
49 lines
953 B
C++
/* SPDX-License-Identifier: Apache-2.0
|
|
* Copyright 2011-2022 Blender Foundation */
|
|
|
|
#ifndef __BACKGROUND_H__
|
|
#define __BACKGROUND_H__
|
|
|
|
#include "graph/node.h"
|
|
|
|
#include "util/types.h"
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
class Device;
|
|
class DeviceScene;
|
|
class Scene;
|
|
class Shader;
|
|
|
|
class Background : public Node {
|
|
public:
|
|
NODE_DECLARE
|
|
|
|
NODE_SOCKET_API(bool, use_shader)
|
|
|
|
NODE_SOCKET_API(uint, visibility)
|
|
NODE_SOCKET_API(Shader *, shader)
|
|
|
|
NODE_SOCKET_API(bool, transparent)
|
|
NODE_SOCKET_API(bool, transparent_glass)
|
|
NODE_SOCKET_API(float, transparent_roughness_threshold)
|
|
|
|
NODE_SOCKET_API(float, volume_step_size)
|
|
|
|
NODE_SOCKET_API(ustring, lightgroup)
|
|
|
|
Background();
|
|
~Background();
|
|
|
|
void device_update(Device *device, DeviceScene *dscene, Scene *scene);
|
|
void device_free(Device *device, DeviceScene *dscene);
|
|
|
|
void tag_update(Scene *scene);
|
|
|
|
Shader *get_shader(const Scene *scene);
|
|
};
|
|
|
|
CCL_NAMESPACE_END
|
|
|
|
#endif /* __BACKGROUND_H__ */
|