Blender
V4.3
source
blender
compositor
realtime_compositor
COM_reduce_to_single_value_operation.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
COM_context.hh
"
8
#include "
COM_result.hh
"
9
#include "
COM_simple_operation.hh
"
10
11
namespace
blender::realtime_compositor
{
12
13
/* ------------------------------------------------------------------------------------------------
14
* Reduce To Single Value Operation
15
*
16
* A simple operation that reduces its input result into a single value output result. The input is
17
* assumed to be a texture result of size 1x1, that is, a texture composed of a single pixel, the
18
* value of which shall serve as the single value of the output result. */
19
class
ReduceToSingleValueOperation
:
public
SimpleOperation
{
20
public
:
21
ReduceToSingleValueOperation
(
Context
&context,
ResultType
type);
22
23
/* Download the input pixel from the GPU texture and set its value to the value of the allocated
24
* single value output result. */
25
void
execute
()
override
;
26
27
/* Determine if a reduce to single value operation is needed for the input with the
28
* given result. If it is not needed, return a null pointer. If it is needed, return an instance
29
* of the operation. */
30
static
SimpleOperation
*
construct_if_needed
(
Context
&context,
const
Result
&input_result);
31
};
32
33
}
// namespace blender::realtime_compositor
COM_context.hh
COM_result.hh
COM_simple_operation.hh
blender::realtime_compositor::Context
Definition
COM_context.hh:37
blender::realtime_compositor::ReduceToSingleValueOperation
Definition
COM_reduce_to_single_value_operation.hh:19
blender::realtime_compositor::ReduceToSingleValueOperation::ReduceToSingleValueOperation
ReduceToSingleValueOperation(Context &context, ResultType type)
Definition
reduce_to_single_value_operation.cc:19
blender::realtime_compositor::ReduceToSingleValueOperation::construct_if_needed
static SimpleOperation * construct_if_needed(Context &context, const Result &input_result)
Definition
reduce_to_single_value_operation.cc:57
blender::realtime_compositor::ReduceToSingleValueOperation::execute
void execute() override
Definition
reduce_to_single_value_operation.cc:28
blender::realtime_compositor::Result
Definition
COM_result.hh:92
blender::realtime_compositor::SimpleOperation
Definition
COM_simple_operation.hh:21
blender::realtime_compositor
Definition
BKE_node.hh:80
blender::realtime_compositor::ResultType
ResultType
Definition
COM_result.hh:21
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0