tornavis/source/blender/compositor/realtime_compositor/intern
Omar Emara 474b6fa070 Realtime Compositor: Support full precision compositing
This patch adds support for full precision compositing for the Realtime
Compositor. A new precision option was added to the compositor to change
between half and full precision compositing, where the Auto option uses
half for the viewport compositor and the interactive render compositor,
while full is used for final renders.

The compositor context now need to implement the get_precision() method
to indicate its preferred precision. Intermediate results will be stored
using the context's precision, with a number of exceptions that can use
a different precision regardless of the context's precision. For
instance, summed area tables are always stored in full float results
even if the context specified half float. Conversely, jump flooding
tables are always stored in half integer results even if the context
specified full. The former requires full float while the latter has no
use for it.

Since shaders are created for a specific precision, we need two variants
of each compositor shader to account for the context's possible
precision. However, to avoid doubling the shader info count and reduce
boilerplate code and development time, an automated mechanism was
employed. A single shader info of whatever precision needs to be added,
then, at runtime, the shader info can be adjusted to change the
precision of the outputs. That shader variant is then cached in the
static cache manager for future processing-free shader retrieval.
Therefore, the shader manager was removed in favor of a cached shader
container in the static cache manager.

A number of utilities were added to make the creation of results as well as
the retrieval of shader with the target precision easier. Further, a
number of precision-specific shaders were removed in favor of more
generic ones that utilizes the aforementioned shader retrieval
mechanism.

Pull Request: https://projects.blender.org/blender/blender/pulls/113476
2023-11-08 08:32:00 +01:00
..
compile_state.cc Realtime Compositor: Support realization of transformations 2023-08-18 10:00:16 +02:00
context.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
conversion_operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
domain.cc License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00
evaluator.cc Cleanup: remove use of 'auto' 2023-09-08 16:53:27 +10:00
input_single_value_operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
node_operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
realize_on_domain_operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
reduce_to_single_value_operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
result.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
scheduler.cc Cleanup: use std::min/max instead of MIN2/MAX2 macros 2023-11-07 16:33:19 +11:00
shader_node.cc License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00
shader_operation.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
simple_operation.cc License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00
static_cache_manager.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00
texture_pool.cc License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00
utilities.cc Realtime Compositor: Support full precision compositing 2023-11-08 08:32:00 +01:00