Cleanup: rename namespace realtime_compositor->compositor

Pull Request: https://projects.blender.org/blender/blender/pulls/132008
This commit is contained in:
Aras Pranckevicius
2024-12-17 11:39:04 +01:00
committed by Aras Pranckevicius
parent b2dd308dca
commit 496a3749d7
213 changed files with 435 additions and 440 deletions

View File

@@ -77,11 +77,11 @@ namespace inverse_eval {
class InverseEvalParams;
} // namespace inverse_eval
} // namespace nodes
namespace realtime_compositor {
namespace compositor {
class Context;
class NodeOperation;
class ShaderNode;
} // namespace realtime_compositor
} // namespace compositor
} // namespace blender
namespace blender::bke {
@@ -133,10 +133,11 @@ using NodeGatherSocketLinkOperationsFunction =
using NodeGatherAddOperationsFunction =
void (*)(blender::nodes::GatherAddNodeSearchParams &params);
using NodeGetCompositorOperationFunction = blender::realtime_compositor::NodeOperation
*(*)(blender::realtime_compositor::Context &context, blender::nodes::DNode node);
using NodeGetCompositorOperationFunction =
blender::compositor::NodeOperation *(*)(blender::compositor::Context &context,
blender::nodes::DNode node);
using NodeGetCompositorShaderNodeFunction =
blender::realtime_compositor::ShaderNode *(*)(blender::nodes::DNode node);
blender::compositor::ShaderNode *(*)(blender::nodes::DNode node);
using NodeExtraInfoFunction = void (*)(blender::nodes::NodeExtraInfoParams &params);
using NodeInverseElemEvalFunction =
void (*)(blender::nodes::value_elem::InverseElemEvalParams &params);

View File

@@ -13,7 +13,7 @@
#include "COM_pixel_operation.hh"
#include "COM_scheduler.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -174,4 +174,4 @@ class CompileState {
Domain compute_pixel_node_domain(DNode node);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,10 +7,10 @@
#include "DNA_color_types.h"
#include "DNA_node_types.h"
namespace blender::realtime_compositor {
namespace blender::compositor {
class RenderContext;
class Profiler;
} // namespace blender::realtime_compositor
} // namespace blender::compositor
struct Render;
@@ -52,8 +52,8 @@ void COM_execute(Render *render,
Scene *scene,
bNodeTree *node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler);
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler);
/**
* \brief Deinitialize the compositor caches and allocated memory.

View File

@@ -22,7 +22,7 @@
#include "COM_static_cache_manager.hh"
#include "COM_texture_pool.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Context
@@ -177,4 +177,4 @@ class Context {
StaticCacheManager &cache_manager();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -11,7 +11,7 @@
#include "COM_result.hh"
#include "COM_simple_operation.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Conversion Operation
@@ -141,4 +141,4 @@ class ConvertVectorToColorOperation : public ConversionOperation {
GPUShader *get_conversion_shader() const override;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Possible interpolations to use when realizing an input result of some domain on another domain.
* See the RealizationOptions struct for more information. */
@@ -165,4 +165,4 @@ bool operator==(const Domain &a, const Domain &b);
/* Inverse of the above equality operator. */
bool operator!=(const Domain &a, const Domain &b);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_operation.hh"
#include "COM_shader_operation.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -176,4 +176,4 @@ class Evaluator {
void cancel_evaluation();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -6,7 +6,7 @@
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Input Realization Options
@@ -42,4 +42,4 @@ class InputDescriptor {
bool expects_single_value = false;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_operation.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -45,4 +45,4 @@ class InputSingleValueOperation : public Operation {
void populate_result(Result result);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -6,7 +6,7 @@
#pragma once
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Cryptomatte Meta Data
@@ -41,4 +41,4 @@ struct MetaData {
bool is_cryptomatte_layer() const;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -23,7 +23,7 @@
#include "COM_pixel_operation.hh"
#include "COM_scheduler.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -107,4 +107,4 @@ class MultiFunctionProcedureOperation : public PixelOperation {
void populate_operation_result(DOutputSocket output_socket, mf::Variable *variable);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -15,7 +15,7 @@
#include "COM_result.hh"
#include "COM_scheduler.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -70,4 +70,4 @@ class NodeOperation : public Operation {
Result *get_preview_result();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -17,7 +17,7 @@
#include "COM_result.hh"
#include "COM_texture_pool.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class SimpleOperation;
@@ -186,4 +186,4 @@ class Operation {
void release_unneeded_results();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -14,7 +14,7 @@
#include "COM_operation.hh"
#include "COM_scheduler.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -142,4 +142,4 @@ class PixelOperation : public Operation {
void release_inputs() override;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -11,7 +11,7 @@
#include "NOD_derived_node_tree.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -46,4 +46,4 @@ class Profiler {
bNodeInstanceKey instance_key);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_result.hh"
#include "COM_simple_operation.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Realize On Domain Operation
@@ -44,4 +44,4 @@ class RealizeOnDomainOperation : public SimpleOperation {
Domain compute_domain() override;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -8,7 +8,7 @@
#include "COM_result.hh"
#include "COM_simple_operation.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Reduce To Single Value Operation
@@ -30,4 +30,4 @@ class ReduceToSingleValueOperation : public SimpleOperation {
static SimpleOperation *construct_if_needed(Context &context, const Result &input_result);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -14,7 +14,7 @@
struct RenderResult;
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* File Output
@@ -119,4 +119,4 @@ class RenderContext {
void save_file_outputs(Scene *scene);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -20,7 +20,7 @@
#include "COM_domain.hh"
#include "COM_meta_data.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -1024,4 +1024,4 @@ inline void Result::copy_pixel(float *target, const float *source) const
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -10,7 +10,7 @@
#include "COM_context.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -22,4 +22,4 @@ using Schedule = VectorSet<DNode>;
* traversal of dependencies based on a heuristic estimation of the number of needed buffers. */
Schedule compute_schedule(const Context &context, const DerivedNodeTree &tree);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "NOD_derived_node_tree.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -86,4 +86,4 @@ class ShaderNode {
void populate_outputs();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -22,7 +22,7 @@
#include "COM_pixel_operation.hh"
#include "COM_scheduler.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -174,4 +174,4 @@ class ShaderOperation : public PixelOperation {
gpu::shader::ShaderCreateInfo &shader_create_info);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_operation.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Simple Operation
@@ -63,4 +63,4 @@ class SimpleOperation : public Operation {
InputDescriptor &get_input_descriptor();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -20,7 +20,7 @@
#include "COM_symmetric_separable_blur_weights.hh"
#include "COM_van_vliet_gaussian_coefficients.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* -------------------------------------------------------------------------------------------------
* Static Cache Manager
@@ -84,4 +84,4 @@ class StaticCacheManager {
void skip_next_reset();
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "GPU_texture.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Texture Pool Key
@@ -75,4 +75,4 @@ class TexturePool {
virtual GPUTexture *allocate_texture(int2 size, eGPUTextureFormat format) = 0;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -15,7 +15,7 @@
#include "COM_input_descriptor.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -88,4 +88,4 @@ template<typename Function> inline void parallel_for(const int2 range, const Fun
});
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,10 +9,10 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Computes a lower resolution version of the given result and sets it as a preview for the given
* node after applying the appropriate color management specified in the given context. */
void compute_preview(Context &context, const nodes::DNode &node, const Result &input_result);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Blur the input using a fourth order IIR filter approximating a Gaussian filter of the given
* sigma computed using Deriche's design method. This is based on the following paper:
@@ -28,4 +28,4 @@ namespace blender::realtime_compositor {
* expected not to be previously allocated. */
void deriche_gaussian_blur(Context &context, Result &input, Result &output, float2 sigma);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,10 +7,10 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Extracts the alpha channel from the given input and write it to the given output. The output
* will be allocated internally and is thus expected not to be previously allocated. */
void extract_alpha(Context &context, Result &input, Result &output);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/**
* Gamma corrects the inputs in its straight alpha form and writes the result to the output. The
@@ -23,4 +23,4 @@ void gamma_correct(Context &context, const Result &input, Result &output);
*/
void gamma_uncorrect(Context &context, const Result &input, Result &output);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Computes a jump flooding table from the given input and writes the result to the output. A jump
* flooding table computes for each pixel the texel location of the closest "seed pixel". A seed
@@ -63,4 +63,4 @@ inline int2 initialize_jump_flooding_value(const int2 &texel, const bool is_seed
return encode_jump_flooding_value(texel, is_seed);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Possible morphological operations to apply. */
enum class MorphologicalBlurOperation : uint8_t {
@@ -38,4 +38,4 @@ void morphological_blur(
const MorphologicalBlurOperation operation = MorphologicalBlurOperation::Erode,
const int filter_type = R_FILTER_GAUSS);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Dilate or erode the given input using a morphological operator with a circular structuring
* element of radius equivalent to the absolute value of the given distance parameter. A positive
@@ -18,4 +18,4 @@ void morphological_distance(Context &context,
Result &output,
const int distance);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Dilate or erode the given input using a morphological inverse distance operation evaluated at
* the given falloff. The radius of the structuring element is equivalent to the absolute value of
@@ -22,4 +22,4 @@ void morphological_distance_feather(Context &context,
const int distance,
const int falloff_type = PROP_SMOOTH);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Sum Reductions.
@@ -113,4 +113,4 @@ float minimum_float_in_range(Context &context,
const float lower_bound,
const float upper_bound);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -10,7 +10,7 @@
#include "COM_domain.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Projects the input on a target domain, copies the area of the input that intersects the target
* domain, and fill the rest with zeros or repetitions of the input depending on the realization
@@ -25,4 +25,4 @@ void realize_on_domain(Context &context,
const float3x3 &input_transformation,
const RealizationOptions &realization_options);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Blur the input using a recursive Gaussian blur algorithm given a certain radius. This differs
* from the standard symmetric separable blur algorithm in that it is orders of magnitude faster
@@ -21,4 +21,4 @@ namespace blender::realtime_compositor {
* expected not to be previously allocated. */
void recursive_gaussian_blur(Context &context, Result &input, Result &output, float2 radius);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Anti-alias the given input using the SMAA algorithm and write the result into the given output.
* See the SMAA_THRESHOLD, SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR, and SMAA_CORNER_ROUNDING defines
@@ -19,4 +19,4 @@ void smaa(Context &context,
const float local_contrast_adaptation_factor = 2.0f,
const int corner_rounding = 25);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -10,7 +10,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Possible operations to apply on pixels before computing the summed area table. The Square
* operation, for instance, can be useful to compute image variance from sum of squares. */
@@ -76,4 +76,4 @@ inline float4 summed_area_table_sum(const Result &table,
return addend - subtrahend;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -11,7 +11,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Blur the input using a horizontal and a vertical separable blur passes given a certain radius
* and filter type using SymmetricSeparableBlurWeights. The output is written to the given output
@@ -25,4 +25,4 @@ void symmetric_separable_blur(Context &context,
const int filter_type = R_FILTER_GAUSS,
const bool extend_bounds = false);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Blur the input using a horizontal and a vertical separable blur passes given the filter type
* using SymmetricSeparableBlurWeights, where the number of weights is equal to weights_resolution.
@@ -30,4 +30,4 @@ void symmetric_separable_blur_variable_size(Context &context,
const int weights_resolution = 128,
const int filter_type = R_FILTER_GAUSS);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -10,7 +10,7 @@
#include "COM_domain.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Transforms the given result based on the given transformation and realization options, writing
* the transformed result to the given output.
@@ -35,4 +35,4 @@ void transform(Context &context,
const float3x3 &transformation,
RealizationOptions realization_options);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_context.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Blur the input using a fourth order IIR filter approximating a Gaussian filter of the given
* sigma computed using Van Vliet's design method. This is based on the following paper:
@@ -33,4 +33,4 @@ namespace blender::realtime_compositor {
* expected not to be previously allocated. */
void van_vliet_gaussian_blur(Context &context, Result &input, Result &output, float2 sigma);
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -24,7 +24,7 @@
#include "COM_algorithm_compute_preview.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static void compute_preview_cpu(Context &context,
const Result &input_result,
@@ -143,4 +143,4 @@ void compute_preview(Context &context, const DNode &node, const Result &input_re
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -16,7 +16,7 @@
#include "COM_algorithm_deriche_gaussian_blur.hh"
#include "COM_deriche_gaussian_coefficients.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
#define FILTER_ORDER 4
@@ -273,4 +273,4 @@ void deriche_gaussian_blur(Context &context, Result &input, Result &output, floa
horizontal_pass_result.release();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_algorithm_extract_alpha.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static void extract_alpha_gpu(Context &context, Result &input, Result &output)
{
@@ -50,4 +50,4 @@ void extract_alpha(Context &context, Result &input, Result &output)
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_algorithm_gamma_correct.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static void gamma_correct_gpu(Context &context, const Result &input, Result &output)
{
@@ -90,4 +90,4 @@ void gamma_uncorrect(Context &context, const Result &input, Result &output)
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -19,7 +19,7 @@
#include "COM_algorithm_jump_flooding.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static void jump_flooding_pass_gpu(Context &context, Result &input, Result &output, int step_size)
{
@@ -144,4 +144,4 @@ void jump_flooding(Context &context, Result &input, Result &output)
output.steal_data(*result_to_flood);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -15,7 +15,7 @@
#include "COM_algorithm_morphological_blur.hh"
#include "COM_algorithm_symmetric_separable_blur.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static const char *get_shader(MorphologicalBlurOperation operation)
{
@@ -101,4 +101,4 @@ void morphological_blur(Context &context,
apply_morphological_operator(context, input, output, operation);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -16,7 +16,7 @@
#include "COM_algorithm_morphological_distance.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static const char *get_shader_name(const int distance)
{
@@ -115,4 +115,4 @@ void morphological_distance(Context &context,
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -14,7 +14,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* The Morphological Distance Feather operation is a linear combination between the result of two
* operations. The first operation is a Gaussian blur with a radius equivalent to the dilate/erode
@@ -307,4 +307,4 @@ void morphological_distance_feather(Context &context,
horizontal_pass_result.release();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -22,7 +22,7 @@
#include "COM_algorithm_parallel_reduction.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Reduces the given texture into a single value and returns it. The return value should be freed
* by a call to MEM_freeN. The return value is either a pointer to a float, or a pointer to an
@@ -807,4 +807,4 @@ float minimum_float_in_range(Context &context,
return minimum_float_in_range_cpu(result, lower_bound, upper_bound);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -21,7 +21,7 @@
#include "COM_algorithm_realize_on_domain.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static const char *get_realization_shader(Result &input,
const RealizationOptions &realization_options)
@@ -184,4 +184,4 @@ void realize_on_domain(Context &context,
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_algorithm_symmetric_separable_blur.hh"
#include "COM_algorithm_van_vliet_gaussian_blur.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Compute the Gaussian sigma from the radius, where the radius is in pixels. Blender's filter is
* truncated at |x| > 3 * sigma as can be seen in the R_FILTER_GAUSS case of the RE_filter_value
@@ -66,4 +66,4 @@ void recursive_gaussian_blur(Context &context, Result &input, Result &output, fl
van_vliet_gaussian_blur(context, input, output, sigma);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -24,7 +24,7 @@
#include "COM_smaa_precomputed_textures.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/**
* _______ ___ ___ ___ ___
@@ -1700,4 +1700,4 @@ void smaa(Context &context,
weights.release();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -19,7 +19,7 @@
#include "COM_algorithm_summed_area_table.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Summed Area Table
@@ -279,4 +279,4 @@ void summed_area_table(Context &context,
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_symmetric_separable_blur_weights.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
template<typename T>
static void blur_pass(const Result &input,
@@ -313,4 +313,4 @@ void symmetric_separable_blur(Context &context,
horizontal_pass_result.release();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_symmetric_separable_blur_weights.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
static void blur_pass(const Result &input,
const Result &radius_input,
@@ -250,4 +250,4 @@ void symmetric_separable_blur_variable_size(Context &context,
horizontal_pass_result.release();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_algorithm_transform.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Given a potentially transformed domain, compute a domain such that its rotation and scale become
* identity and the size of the domain is increased/reduced to adapt to the new transformation. For
@@ -82,4 +82,4 @@ void transform(Context &context,
output.get_realization_options().interpolation = realization_options.interpolation;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -15,7 +15,7 @@
#include "COM_algorithm_van_vliet_gaussian_blur.hh"
#include "COM_van_vliet_gaussian_coefficients.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
#define FILTER_ORDER 2
@@ -389,4 +389,4 @@ void van_vliet_gaussian_blur(Context &context, Result &input, Result &output, fl
horizontal_pass_result.release();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -95,4 +95,4 @@ class BokehKernelContainer : CachedResourceContainer {
float lens_shift);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -17,7 +17,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -75,4 +75,4 @@ class CachedImageContainer : CachedResourceContainer {
Result get(Context &context, Image *image, const ImageUser *image_user, const char *pass_name);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -17,7 +17,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -93,4 +93,4 @@ class CachedMaskContainer : CachedResourceContainer {
float motion_blur_shutter);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -4,7 +4,7 @@
#pragma once
namespace blender::realtime_compositor {
namespace blender::compositor {
/* -------------------------------------------------------------------------------------------------
* Cached Resource.
@@ -49,4 +49,4 @@ class CachedResourceContainer {
virtual void reset() = 0;
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -15,7 +15,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Cached Shader Key.
@@ -67,4 +67,4 @@ class CachedShaderContainer : public CachedResourceContainer {
GPUShader *get(const char *info_name, ResultPrecision precision);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -16,7 +16,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -85,4 +85,4 @@ class CachedTextureContainer : CachedResourceContainer {
float3 scale);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -84,4 +84,4 @@ class DericheGaussianCoefficientsContainer : CachedResourceContainer {
DericheGaussianCoefficients &get(Context &context, float sigma);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -16,7 +16,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -88,4 +88,4 @@ class DistortionGridContainer : CachedResourceContainer {
Context &context, MovieClip *movie_clip, int2 size, DistortionType type, int frame_number);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Fog Glow Kernel Key.
@@ -72,4 +72,4 @@ class FogGlowKernelContainer : CachedResourceContainer {
FogGlowKernel &get(int kernel_size, int2 spatial_size);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -17,7 +17,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -86,4 +86,4 @@ class KeyingScreenContainer : CachedResourceContainer {
float smoothness);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -78,4 +78,4 @@ class MorphologicalDistanceFeatherWeightsContainer : CachedResourceContainer {
MorphologicalDistanceFeatherWeights &get(Context &context, int type, int radius);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -9,7 +9,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -72,4 +72,4 @@ class OCIOColorSpaceConversionShaderContainer : CachedResourceContainer {
OCIOColorSpaceConversionShader &get(Context &context, std::string source, std::string target);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_cached_resource.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -68,4 +68,4 @@ class SMAAPrecomputedTexturesContainer : public CachedResourceContainer {
SMAAPrecomputedTextures &get(Context &context);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -69,4 +69,4 @@ class SymmetricBlurWeightsContainer : public CachedResourceContainer {
Result &get(Context &context, int type, float2 radius);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -80,4 +80,4 @@ class SymmetricSeparableBlurWeightsContainer : public CachedResourceContainer {
/** \} */
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_cached_resource.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class Context;
@@ -103,4 +103,4 @@ class VanVlietGaussianCoefficientsContainer : CachedResourceContainer {
VanVlietGaussianCoefficients &get(Context &context, float sigma);
};
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Bokeh Kernel Key.
@@ -308,4 +308,4 @@ Result &BokehKernelContainer::get(Context &context,
return bokeh_kernel.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -29,7 +29,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Cached Image Key.
@@ -302,4 +302,4 @@ Result CachedImageContainer::get(Context &context,
return cached_image.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -24,7 +24,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Cached Mask Key.
@@ -208,4 +208,4 @@ Result &CachedMaskContainer::get(Context &context,
return cached_mask.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -16,7 +16,7 @@
#include "gpu_shader_create_info.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Cached Shader Key.
@@ -98,4 +98,4 @@ GPUShader *CachedShaderContainer::get(const char *info_name, ResultPrecision pre
return cached_shader.shader();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -28,7 +28,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Cached Texture Key.
@@ -164,4 +164,4 @@ CachedTexture &CachedTextureContainer::get(Context &context,
return cached_texture;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -32,7 +32,7 @@
#include "COM_context.hh"
#include "COM_deriche_gaussian_coefficients.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Deriche Gaussian Coefficients Key.
@@ -316,4 +316,4 @@ DericheGaussianCoefficients &DericheGaussianCoefficientsContainer::get(Context &
return deriche_gaussian_coefficients;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -24,7 +24,7 @@
#include "COM_distortion_grid.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Distortion Grid Key.
@@ -148,4 +148,4 @@ Result &DistortionGridContainer::get(
return distortion_grid.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -23,7 +23,7 @@
#include "COM_fog_glow_kernel.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Fog Glow Kernel Key.
@@ -177,4 +177,4 @@ FogGlowKernel &FogGlowKernelContainer::get(int kernel_size, int2 spatial_size)
return kernel;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -32,7 +32,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Keying Screen Key.
@@ -285,4 +285,4 @@ Result &KeyingScreenContainer::get(Context &context,
return keying_screen.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -20,7 +20,7 @@
#include "COM_morphological_distance_feather_weights.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Morphological Distance Feather Weights Key.
@@ -179,4 +179,4 @@ MorphologicalDistanceFeatherWeights &MorphologicalDistanceFeatherWeightsContaine
return weights;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -28,7 +28,7 @@
# include <OpenColorIO/OpenColorIO.h>
#endif
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* OCIO Color Space Conversion Shader Key.
@@ -562,4 +562,4 @@ OCIOColorSpaceConversionShader &OCIOColorSpaceConversionShaderContainer::get(Con
return shader;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -14,7 +14,7 @@
#include "COM_smaa_precomputed_textures.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* SMAA Precomputed Textures.
@@ -134,4 +134,4 @@ SMAAPrecomputedTextures &SMAAPrecomputedTexturesContainer::get(Context &context)
return *textures_;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -19,7 +19,7 @@
#include "COM_result.hh"
#include "COM_symmetric_blur_weights.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Symmetric Blur Weights Key.
@@ -142,4 +142,4 @@ Result &SymmetricBlurWeightsContainer::get(Context &context, int type, float2 ra
return weights.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_result.hh"
#include "COM_symmetric_separable_blur_weights.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Symmetric Separable Blur Weights Key.
@@ -122,4 +122,4 @@ Result &SymmetricSeparableBlurWeightsContainer::get(Context &context, int type,
return weights.result;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -38,7 +38,7 @@
#include "COM_context.hh"
#include "COM_van_vliet_gaussian_coefficients.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Van Vliet Gaussian Coefficients Key.
@@ -533,4 +533,4 @@ VanVlietGaussianCoefficients &VanVlietGaussianCoefficientsContainer::get(Context
return deriche_gaussian_coefficients;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -54,8 +54,8 @@ void COM_execute(Render *render,
Scene *scene,
bNodeTree *node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler)
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler)
{
/* Initialize mutex, TODO: this mutex init is actually not thread safe and
* should be done somewhere as part of blender startup, all the other

View File

@@ -19,7 +19,7 @@
#include "COM_scheduler.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -193,4 +193,4 @@ Domain CompileState::compute_pixel_node_domain(DNode node)
return node_domain;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -18,7 +18,7 @@
#include "COM_static_cache_manager.hh"
#include "COM_texture_pool.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
Context::Context(TexturePool &texture_pool) : texture_pool_(texture_pool) {}
@@ -119,4 +119,4 @@ StaticCacheManager &Context::cache_manager()
return cache_manager_;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* --------------------------------------------------------------------
* Conversion Operation
@@ -270,4 +270,4 @@ GPUShader *ConvertVectorToColorOperation::get_conversion_shader() const
return context().get_shader("compositor_convert_vector_to_color");
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "COM_domain.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
Domain::Domain(const int2 &size) : size(size), transformation(float3x3::identity()) {}
@@ -36,4 +36,4 @@ bool operator!=(const Domain &a, const Domain &b)
return !(a == b);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -19,7 +19,7 @@
#include "COM_shader_operation.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -234,4 +234,4 @@ void Evaluator::cancel_evaluation()
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -10,7 +10,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
const StringRef InputSingleValueOperation::output_identifier_ = StringRef("Output");
@@ -63,4 +63,4 @@ void InputSingleValueOperation::populate_result(Result result)
Operation::populate_result(output_identifier_, result);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -4,7 +4,7 @@
#include "COM_meta_data.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
bool MetaData::is_cryptomatte_layer() const
{
@@ -12,4 +12,4 @@ bool MetaData::is_cryptomatte_layer() const
!this->cryptomatte.conversion.empty();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -39,7 +39,7 @@
#include "COM_scheduler.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -407,4 +407,4 @@ void MultiFunctionProcedureOperation::populate_operation_result(DOutputSocket ou
parameter_identifiers_.append(output_identifier);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -32,7 +32,7 @@
#include "COM_scheduler.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -62,7 +62,7 @@ void NodeOperation::evaluate()
void NodeOperation::compute_preview()
{
if (context().should_compute_node_previews() && is_node_preview_needed(node())) {
realtime_compositor::compute_preview(context(), node(), *get_preview_result());
compositor::compute_preview(context(), node(), *get_preview_result());
}
}
@@ -115,4 +115,4 @@ bool NodeOperation::should_compute_output(StringRef identifier)
return get_result(identifier).should_compute();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -20,7 +20,7 @@
#include "COM_simple_operation.hh"
#include "COM_texture_pool.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
Operation::Operation(Context &context) : context_(context) {}
@@ -221,4 +221,4 @@ void Operation::release_inputs()
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -20,7 +20,7 @@
#include "COM_shader_operation.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -57,7 +57,7 @@ void PixelOperation::compute_preview()
{
for (const DOutputSocket &output : preview_outputs_) {
Result &result = get_result(get_output_identifier_from_output_socket(output));
realtime_compositor::compute_preview(context(), output.node(), result);
compositor::compute_preview(context(), output.node(), result);
/* Preview results gets as an extra reference in pixel operations as can be seen in the
* compute_results_reference_counts method, so release it after computing preview. */
result.release();
@@ -100,4 +100,4 @@ void PixelOperation::release_inputs()
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_context.hh"
#include "COM_profiler.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
Map<bNodeInstanceKey, timeit::Nanoseconds> &Profiler::get_nodes_evaluation_times()
{
@@ -69,4 +69,4 @@ void Profiler::finalize(const bNodeTree &node_tree)
this->accumulate_node_group_times(node_tree, bke::NODE_INSTANCE_KEY_BASE);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -12,7 +12,7 @@
#include "COM_realize_on_domain_operation.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* Realize On Domain Operation
@@ -84,4 +84,4 @@ SimpleOperation *RealizeOnDomainOperation::construct_if_needed(
return new RealizeOnDomainOperation(context, operation_domain, input_descriptor.type);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -14,7 +14,7 @@
#include "COM_reduce_to_single_value_operation.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
ReduceToSingleValueOperation::ReduceToSingleValueOperation(Context &context, ResultType type)
: SimpleOperation(context)
@@ -82,4 +82,4 @@ SimpleOperation *ReduceToSingleValueOperation::construct_if_needed(Context &cont
return new ReduceToSingleValueOperation(context, input_result.type());
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -28,7 +28,7 @@
#include "COM_render_context.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* ------------------------------------------------------------------------------------------------
* File Output
@@ -153,4 +153,4 @@ void RenderContext::save_file_outputs(Scene *scene)
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -17,7 +17,7 @@
#include "COM_domain.hh"
#include "COM_result.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
Result::Result(Context &context) : context_(&context) {}
@@ -778,4 +778,4 @@ void Result::allocate_data(int2 size, bool from_pool)
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -16,7 +16,7 @@
#include "COM_scheduler.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -363,4 +363,4 @@ Schedule compute_schedule(const Context &context, const DerivedNodeTree &tree)
return schedule;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -15,7 +15,7 @@
#include "COM_shader_node.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -203,4 +203,4 @@ void ShaderNode::populate_outputs()
}
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -34,7 +34,7 @@
#include <sstream>
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
@@ -553,4 +553,4 @@ void ShaderOperation::generate_code_for_inputs(GPUMaterial *material,
shader_create_info.compute_source_generated += initialize_attributes.str();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "COM_result.hh"
#include "COM_simple_operation.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
const StringRef SimpleOperation::input_identifier_ = StringRef("Input");
const StringRef SimpleOperation::output_identifier_ = StringRef("Output");
@@ -52,4 +52,4 @@ InputDescriptor &SimpleOperation::get_input_descriptor()
return Operation::get_input_descriptor(input_identifier_);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -4,7 +4,7 @@
#include "COM_static_cache_manager.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
void StaticCacheManager::reset()
{
@@ -35,4 +35,4 @@ void StaticCacheManager::skip_next_reset()
should_skip_next_reset_ = true;
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -13,7 +13,7 @@
#include "COM_texture_pool.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* -------------------------------------------------------------------- */
/** \name Texture Pool Key
@@ -69,4 +69,4 @@ void TexturePool::reset()
/** \} */
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -19,7 +19,7 @@
#include "COM_result.hh"
#include "COM_utilities.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
using namespace nodes::derived_node_tree_types;
using TargetSocketPathInfo = DOutputSocket::TargetSocketPathInfo;
@@ -170,4 +170,4 @@ DOutputSocket find_preview_output_socket(const DNode &node)
return DOutputSocket();
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -7,7 +7,7 @@
#include "BLI_math_base.hh"
#include "BLI_math_vector_types.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
/* Computes the number of diagonals in the matrix of the given size, where the diagonals are
* indexed from the upper left corner to the lower right corner such that their start is at the
@@ -177,4 +177,4 @@ inline int2 get_anti_diagonal_direction()
return int2(-1, 1);
}
} // namespace blender::realtime_compositor
} // namespace blender::compositor

View File

@@ -36,9 +36,9 @@
#include "compositor_engine.h" /* Own include. */
namespace blender::draw::compositor {
namespace blender::draw::compositor_engine {
class TexturePool : public realtime_compositor::TexturePool {
class TexturePool : public compositor::TexturePool {
public:
GPUTexture *allocate_texture(int2 size, eGPUTextureFormat format) override
{
@@ -48,15 +48,15 @@ class TexturePool : public realtime_compositor::TexturePool {
}
};
class Context : public realtime_compositor::Context {
class Context : public compositor::Context {
private:
/* A pointer to the info message of the compositor engine. This is a char array of size
* GPU_INFO_SIZE. The message is cleared prior to updating or evaluating the compositor. */
char *info_message_;
public:
Context(realtime_compositor::TexturePool &texture_pool, char *info_message)
: realtime_compositor::Context(texture_pool), info_message_(info_message)
Context(compositor::TexturePool &texture_pool, char *info_message)
: compositor::Context(texture_pool), info_message_(info_message)
{
}
@@ -134,45 +134,41 @@ class Context : public realtime_compositor::Context {
return visible_camera_region;
}
realtime_compositor::Result get_output_result() override
compositor::Result get_output_result() override
{
realtime_compositor::Result result = this->create_result(
realtime_compositor::ResultType::Color, realtime_compositor::ResultPrecision::Half);
compositor::Result result = this->create_result(compositor::ResultType::Color,
compositor::ResultPrecision::Half);
result.wrap_external(DRW_viewport_texture_list_get()->color);
return result;
}
realtime_compositor::Result get_viewer_output_result(
realtime_compositor::Domain /*domain*/,
bool /*is_data*/,
realtime_compositor::ResultPrecision /*precision*/) override
compositor::Result get_viewer_output_result(compositor::Domain /*domain*/,
bool /*is_data*/,
compositor::ResultPrecision /*precision*/) override
{
realtime_compositor::Result result = this->create_result(
realtime_compositor::ResultType::Color, realtime_compositor::ResultPrecision::Half);
compositor::Result result = this->create_result(compositor::ResultType::Color,
compositor::ResultPrecision::Half);
result.wrap_external(DRW_viewport_texture_list_get()->color);
return result;
}
realtime_compositor::Result get_pass(const Scene *scene,
int view_layer,
const char *pass_name) override
compositor::Result get_pass(const Scene *scene, int view_layer, const char *pass_name) override
{
if (DEG_get_original_id(const_cast<ID *>(&scene->id)) !=
DEG_get_original_id(&DRW_context_state_get()->scene->id))
{
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
if (view_layer != 0) {
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
/* The combined pass is a special case where we return the viewport color texture, because it
* includes Grease Pencil objects since GP is drawn using their own engine. */
if (STREQ(pass_name, RE_PASSNAME_COMBINED)) {
GPUTexture *combined_texture = DRW_viewport_texture_list_get()->color;
realtime_compositor::Result pass = realtime_compositor::Result(
*this, GPU_texture_format(combined_texture));
compositor::Result pass = compositor::Result(*this, GPU_texture_format(combined_texture));
pass.wrap_external(combined_texture);
return pass;
}
@@ -180,13 +176,12 @@ class Context : public realtime_compositor::Context {
/* Return the pass that was written by the engine if such pass was found. */
GPUTexture *pass_texture = DRW_viewport_pass_texture_get(pass_name).gpu_texture();
if (pass_texture) {
realtime_compositor::Result pass = realtime_compositor::Result(
*this, GPU_texture_format(pass_texture));
compositor::Result pass = compositor::Result(*this, GPU_texture_format(pass_texture));
pass.wrap_external(pass_texture);
return pass;
}
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
StringRef get_view_name() const override
@@ -196,17 +191,17 @@ class Context : public realtime_compositor::Context {
return view->name;
}
realtime_compositor::ResultPrecision get_precision() const override
compositor::ResultPrecision get_precision() const override
{
switch (get_scene().r.compositor_precision) {
case SCE_COMPOSITOR_PRECISION_AUTO:
return realtime_compositor::ResultPrecision::Half;
return compositor::ResultPrecision::Half;
case SCE_COMPOSITOR_PRECISION_FULL:
return realtime_compositor::ResultPrecision::Full;
return compositor::ResultPrecision::Full;
}
BLI_assert_unreachable();
return realtime_compositor::ResultPrecision::Half;
return compositor::ResultPrecision::Half;
}
void set_info_message(StringRef message) const override
@@ -228,7 +223,7 @@ class Engine {
private:
TexturePool texture_pool_;
Context context_;
realtime_compositor::Evaluator evaluator_;
compositor::Evaluator evaluator_;
/* Stores the compositing region size at the time the last compositor evaluation happened. See
* the update_compositing_region_size method for more information. */
int2 last_compositing_region_size_;
@@ -272,9 +267,9 @@ class Engine {
}
};
} // namespace blender::draw::compositor
} // namespace blender::draw::compositor_engine
using namespace blender::draw::compositor;
using namespace blender::draw::compositor_engine;
struct COMPOSITOR_Data {
DrawEngineType *engine_type;

View File

@@ -103,7 +103,7 @@ struct CompoJob {
float *progress;
bool cancelled;
realtime_compositor::Profiler profiler;
compositor::Profiler profiler;
};
float node_socket_calculate_height(const bNodeSocket &socket)

View File

@@ -10,10 +10,10 @@
#include "BKE_node.hh"
namespace blender::realtime_compositor {
namespace blender::compositor {
class RenderContext;
class Profiler;
} // namespace blender::realtime_compositor
} // namespace blender::compositor
namespace blender::bke {
struct bNodeTreeType;
} // namespace blender::bke
@@ -42,8 +42,8 @@ void ntreeCompositExecTree(Render *render,
bNodeTree *ntree,
RenderData *rd,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler);
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler);
/**
* Called from render pipeline, to tag render input and output.

View File

@@ -48,7 +48,7 @@ enum class OutputSocketFieldType {
};
/**
* A bit-field that maps to the #realtime_compositor::InputRealizationOptions.
* A bit-field that maps to the #compositor::InputRealizationOptions.
*/
enum class CompositorInputRealizationOptions : uint8_t {
None = 0,
@@ -201,11 +201,11 @@ class SocketDeclaration : public ItemDeclaration {
CompositorInputRealizationOptions::RealizeOnOperationDomain;
/** The priority of the input for determining the domain of the node. See
* realtime_compositor::InputDescriptor for more information. */
* compositor::InputDescriptor for more information. */
int compositor_domain_priority_ = 0;
/** This input expects a single value and can't operate on non-single values. See
* realtime_compositor::InputDescriptor for more information. */
* compositor::InputDescriptor for more information. */
bool compositor_expects_single_value_ = false;
/** Utility method to make the socket available if there is a straightforward way to do so. */
@@ -357,13 +357,13 @@ class BaseSocketDeclarationBuilder {
/**
* The priority of the input for determining the domain of the node. See
* realtime_compositor::InputDescriptor for more information.
* compositor::InputDescriptor for more information.
*/
BaseSocketDeclarationBuilder &compositor_domain_priority(int priority);
/**
* This input expects a single value and can't operate on non-single values. See
* realtime_compositor::InputDescriptor for more information.
* compositor::InputDescriptor for more information.
*/
BaseSocketDeclarationBuilder &compositor_expects_single_value(bool value = true);

View File

@@ -178,8 +178,8 @@ void ntreeCompositExecTree(Render *render,
bNodeTree *ntree,
RenderData *rd,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler)
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler)
{
COM_execute(render, rd, scene, ntree, view_name, render_context, profiler);
}

View File

@@ -59,7 +59,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(col, ptr, "premul", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static bool get_use_premultiply(const bNode &node)
{

View File

@@ -50,7 +50,7 @@ static void node_composit_buts_antialiasing(uiLayout *layout, bContext * /*C*/,
uiItemR(col, ptr, "corner_rounding", UI_ITEM_NONE, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class AntiAliasingOperation : public NodeOperation {
public:

View File

@@ -55,7 +55,7 @@ static void node_composit_buts_bilateralblur(uiLayout *layout, bContext * /*C*/,
uiItemR(col, ptr, "sigma_space", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class BilateralBlurOperation : public NodeOperation {
public:

View File

@@ -95,7 +95,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext * /*C*/, PointerR
uiItemR(col, ptr, "use_extended_bounds", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class BlurOperation : public NodeOperation {
public:

View File

@@ -60,7 +60,7 @@ static void node_composit_buts_bokehblur(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(layout, ptr, "use_extended_bounds", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class BokehBlurOperation : public NodeOperation {
public:

View File

@@ -65,7 +65,7 @@ static void node_composit_buts_bokehimage(uiLayout *layout, bContext * /*C*/, Po
ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class BokehImageOperation : public NodeOperation {
public:

View File

@@ -80,7 +80,7 @@ static void node_composit_buts_boxmask(uiLayout *layout, bContext * /*C*/, Point
uiItemR(layout, ptr, "mask_type", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
template<CMPNodeMaskType MaskType>
static void box_mask(const Result &base_mask,

View File

@@ -48,7 +48,7 @@ static void node_composit_buts_brightcontrast(uiLayout *layout, bContext * /*C*/
uiItemR(layout, ptr, "use_premultiply", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static bool get_use_premultiply(const bNode &node)
{

View File

@@ -106,7 +106,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext * /*C*/,
ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CMPNodeChannelMatteColorSpace get_color_space(const bNode &node)
{

View File

@@ -73,7 +73,7 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext * /*C*/,
// uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static float get_acceptance(const bNode &node)
{

View File

@@ -77,7 +77,7 @@ static void node_composit_buts_color_matte(uiLayout *layout, bContext * /*C*/, P
ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static float get_hue_epsilon(const bNode &node)
{

View File

@@ -102,7 +102,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext * /*C*/, P
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
/* Get the index of the channel used for spilling. */
static int get_spill_channel(const bNode &node)

View File

@@ -209,7 +209,7 @@ static void node_composit_buts_colorbalance_ex(uiLayout *layout, bContext * /*C*
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CMPNodeColorBalanceMethod get_color_balance_method(const bNode &node)
{

View File

@@ -311,7 +311,7 @@ static void node_composit_buts_colorcorrection_ex(uiLayout *layout,
uiItemR(row, ptr, "midtones_end", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ColorCorrectionShaderNode : public ShaderNode {
public:

View File

@@ -35,7 +35,7 @@ static void node_composit_buts_composite(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(layout, ptr, "use_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CompositeOperation : public NodeOperation {
public:

View File

@@ -62,7 +62,7 @@ static void node_composit_buts_convert_colorspace(uiLayout *layout,
uiItemR(layout, ptr, "to_color_space", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ConvertColorSpaceOperation : public NodeOperation {
public:

View File

@@ -52,7 +52,7 @@ static void cmp_node_cornerpin_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Plane");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CornerPinOperation : public NodeOperation {
public:

View File

@@ -70,7 +70,7 @@ static void node_composit_buts_crop(uiLayout *layout, bContext * /*C*/, PointerR
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CropOperation : public NodeOperation {
public:

View File

@@ -227,7 +227,7 @@ namespace blender::nodes::node_composite_base_cryptomatte_cc {
NODE_STORAGE_FUNCS(NodeCryptomatte)
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class BaseCryptoMatteOperation : public NodeOperation {
public:
@@ -658,7 +658,7 @@ static void node_update_cryptomatte(bNodeTree *ntree, bNode *node)
ntreeCompositCryptomatteUpdateLayerNames(node);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
using namespace blender::nodes::node_composite_base_cryptomatte_cc;
class CryptoMatteOperation : public BaseCryptoMatteOperation {
@@ -967,7 +967,7 @@ static void node_init_cryptomatte_legacy(bNodeTree *ntree, bNode *node)
ntreeCompositCryptomatteAddSocket(ntree, node);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
using namespace blender::nodes::node_composite_base_cryptomatte_cc;
class LegacyCryptoMatteOperation : public BaseCryptoMatteOperation {

View File

@@ -45,7 +45,7 @@ static void node_composit_init_curves_time(bNodeTree * /*ntree*/, bNode *node)
node->storage = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class TimeCurveOperation : public NodeOperation {
public:
@@ -140,7 +140,7 @@ static void node_buts_curvevec(uiLayout *layout, bContext * /*C*/, PointerRNA *p
uiTemplateCurveMapping(layout, ptr, "mapping", 'v', false, false, false, false);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CurveMapping *get_curve_mapping(const bNode &node)
{
@@ -260,7 +260,7 @@ static void node_composit_init_curve_rgb(bNodeTree * /*ntree*/, bNode *node)
node->storage = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CurveMapping *get_curve_mapping(const bNode &node)
{

View File

@@ -94,7 +94,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA
uiItemR(sub, ptr, "z_scale", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class DefocusOperation : public NodeOperation {
public:

View File

@@ -75,7 +75,7 @@ static void node_composit_buts_denoise(uiLayout *layout, bContext * /*C*/, Point
uiItemR(layout, ptr, "use_hdr", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
/* A callback to cancel the filter operations by evaluating the context's is_canceled method. The
* API specifies that true indicates the filter should continue, while false indicates it should

View File

@@ -54,7 +54,7 @@ static void node_composit_buts_despeckle(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(col, ptr, "threshold_neighbor", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class DespeckleOperation : public NodeOperation {
public:

View File

@@ -64,7 +64,7 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext * /*C*/, Po
col, ptr, "falloff", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static float get_tolerance(const bNode &node)
{

View File

@@ -64,7 +64,7 @@ static void node_composit_buts_dilateerode(uiLayout *layout, bContext * /*C*/, P
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class DilateErodeOperation : public NodeOperation {
public:

View File

@@ -63,7 +63,7 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext * /*C*/, Pointer
uiItemR(layout, ptr, "zoom", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class DirectionalBlurOperation : public NodeOperation {
public:

View File

@@ -45,7 +45,7 @@ static void cmp_node_displace_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class DisplaceOperation : public NodeOperation {
public:

View File

@@ -72,7 +72,7 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext * /*C*/
col, ptr, "falloff", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CMPNodeDistanceMatteColorSpace get_color_space(const bNode &node)
{

View File

@@ -48,7 +48,7 @@ static void node_composit_buts_double_edge_mask(uiLayout *layout,
uiItemR(col, ptr, "edge_mode", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class DoubleEdgeMaskOperation : public NodeOperation {
public:

View File

@@ -78,7 +78,7 @@ static void node_composit_buts_ellipsemask(uiLayout *layout, bContext * /*C*/, P
uiItemR(layout, ptr, "mask_type", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
template<CMPNodeMaskType MaskType>
static void ellipse_mask(const Result &base_mask,

View File

@@ -33,7 +33,7 @@ static void cmp_node_exposure_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ExposureShaderNode : public ShaderNode {
public:

View File

@@ -503,7 +503,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class FileOutputOperation : public NodeOperation {
public:

View File

@@ -41,7 +41,7 @@ static void node_composit_buts_filter(uiLayout *layout, bContext * /*C*/, Pointe
uiItemR(layout, ptr, "filter_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class FilterOperation : public NodeOperation {
public:

View File

@@ -38,7 +38,7 @@ static void node_composit_buts_flip(uiLayout *layout, bContext * /*C*/, PointerR
uiItemR(layout, ptr, "axis", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class FlipOperation : public NodeOperation {
public:

View File

@@ -37,7 +37,7 @@ static void cmp_node_gamma_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class GammaShaderNode : public ShaderNode {
public:

View File

@@ -128,7 +128,7 @@ static void node_composit_buts_glare(uiLayout *layout, bContext * /*C*/, Pointer
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class GlareOperation : public NodeOperation {
public:

View File

@@ -58,7 +58,7 @@ static void cmp_node_huesatval_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class HueSaturationValueShaderNode : public ShaderNode {
public:

View File

@@ -57,7 +57,7 @@ static void node_composit_init_huecorrect(bNodeTree * /*ntree*/, bNode *node)
cumapping->cur = 1;
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CurveMapping *get_curve_mapping(const bNode &node)
{

View File

@@ -42,7 +42,7 @@ static void node_composit_buts_id_mask(uiLayout *layout, bContext * /*C*/, Point
uiItemR(layout, ptr, "use_antialiasing", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class IDMaskOperation : public NodeOperation {
public:

View File

@@ -440,7 +440,7 @@ static void node_composit_copy_image(bNodeTree * /*dst_ntree*/,
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ImageOperation : public NodeOperation {
public:
@@ -659,7 +659,7 @@ static void node_composit_buts_viewlayers(uiLayout *layout, bContext *C, Pointer
RNA_string_set(&op_ptr, "scene", scene_name);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class RenderLayerOperation : public NodeOperation {
public:

View File

@@ -40,7 +40,7 @@ static void node_composit_buts_inpaint(uiLayout *layout, bContext * /*C*/, Point
uiItemR(layout, ptr, "distance", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class InpaintOperation : public NodeOperation {
public:

View File

@@ -54,7 +54,7 @@ static void node_composit_buts_invert(uiLayout *layout, bContext * /*C*/, Pointe
uiItemR(col, ptr, "invert_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static bool should_invert_rgb(const bNode &node)
{

View File

@@ -82,7 +82,7 @@ static void node_composit_buts_keying(uiLayout *layout, bContext * /*C*/, Pointe
uiItemR(layout, ptr, "blur_post", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class KeyingOperation : public NodeOperation {
public:

View File

@@ -81,7 +81,7 @@ static void node_composit_buts_keyingscreen(uiLayout *layout, bContext *C, Point
uiItemR(layout, ptr, "smoothness", UI_ITEM_NONE, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class KeyingScreenOperation : public NodeOperation {
public:

View File

@@ -73,7 +73,7 @@ static void node_composit_buts_kuwahara(uiLayout *layout, bContext * /*C*/, Poin
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ConvertKuwaharaOperation : public NodeOperation {
public:

View File

@@ -76,7 +76,7 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext * /*C*/, Poin
uiItemR(col, ptr, "use_fit", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
/* --------------------------------------------------------------------
* Screen Lens Distortion

View File

@@ -45,7 +45,7 @@ static void node_composit_buts_view_levels(uiLayout *layout, bContext * /*C*/, P
uiItemR(layout, ptr, "channel", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class LevelsOperation : public NodeOperation {
private:

View File

@@ -67,7 +67,7 @@ static void node_composit_buts_luma_matte(uiLayout *layout, bContext * /*C*/, Po
ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static float get_high(const bNode &node)
{

View File

@@ -63,7 +63,7 @@ static void node_composit_buts_map_range(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(col, ptr, "use_clamp", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static bool get_should_clamp(const bNode &node)
{

View File

@@ -49,7 +49,7 @@ static void node_composit_init_map_uv(bNodeTree * /*ntree*/, bNode *node)
node->custom2 = CMP_NODE_MAP_UV_FILTERING_ANISOTROPIC;
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class MapUVOperation : public NodeOperation {
public:

View File

@@ -65,7 +65,7 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(sub, ptr, "max", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static bool get_use_min(const bNode &node)
{

View File

@@ -70,7 +70,7 @@ static void node_composit_buts_mask(uiLayout *layout, bContext *C, PointerRNA *p
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class MaskOperation : public NodeOperation {
public:

View File

@@ -69,7 +69,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class MathShaderNode : public ShaderNode {
public:

View File

@@ -73,7 +73,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static int get_mode(const bNode &node)
{

View File

@@ -76,7 +76,7 @@ static void node_composit_buts_movieclip_ex(uiLayout *layout, bContext *C, Point
uiTemplateColorspaceSettings(layout, &clipptr, "colorspace_settings");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class MovieClipOperation : public NodeOperation {
public:

View File

@@ -87,7 +87,7 @@ static void node_composit_buts_moviedistortion(uiLayout *layout, bContext *C, Po
uiItemR(layout, ptr, "distortion_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class MovieDistortionOperation : public NodeOperation {
public:

View File

@@ -39,7 +39,7 @@ static void cmp_node_normal_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Dot");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
/* The vector value is stored in the default value of the output socket. */
static float3 get_vector_value(const bNode &node)

View File

@@ -26,7 +26,7 @@ static void cmp_node_normalize_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Value");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class NormalizeOperation : public NodeOperation {
private:

View File

@@ -39,7 +39,7 @@ static void node_composit_buts_pixelate(uiLayout *layout, bContext * /*C*/, Poin
uiItemR(layout, ptr, "pixel_size", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class PixelateOperation : public NodeOperation {
public:

View File

@@ -113,7 +113,7 @@ static void node_composit_buts_planetrackdeform(uiLayout *layout, bContext *C, P
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class PlaneTrackDeformOperation : public NodeOperation {
public:

View File

@@ -37,7 +37,7 @@ static void cmp_node_posterize_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class PosterizeShaderNode : public ShaderNode {
public:

View File

@@ -38,7 +38,7 @@ static void node_composit_buts_premulkey(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(layout, ptr, "mapping", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CMPNodeAlphaConvertMode get_mode(const bNode &node)
{

View File

@@ -23,7 +23,7 @@ static void cmp_node_rgb_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("RGBA").default_value({0.5f, 0.5f, 0.5f, 1.0f});
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class RGBOperation : public NodeOperation {
public:

View File

@@ -46,7 +46,7 @@ static void node_composit_buts_rotate(uiLayout *layout, bContext * /*C*/, Pointe
uiItemR(layout, ptr, "filter_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class RotateOperation : public NodeOperation {
public:

View File

@@ -81,7 +81,7 @@ static void node_composit_buts_scale(uiLayout *layout, bContext * /*C*/, Pointer
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ScaleOperation : public NodeOperation {
public:

View File

@@ -17,7 +17,7 @@ static void cmp_node_scene_time_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Frame");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SceneTimeOperation : public NodeOperation {
public:

View File

@@ -89,7 +89,7 @@ static void cmp_node_separate_color_update(bNodeTree * /*ntree*/, bNode *node)
node_cmp_combsep_color_label(&node->outputs, (CMPNodeCombSepColorMode)storage->mode);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SeparateColorShaderNode : public ShaderNode {
public:
@@ -293,7 +293,7 @@ static void cmp_node_combine_color_update(bNodeTree * /*ntree*/, bNode *node)
node_cmp_combsep_color_label(&node->inputs, (CMPNodeCombSepColorMode)storage->mode);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CombineColorShaderNode : public ShaderNode {
public:

View File

@@ -27,7 +27,7 @@ static void cmp_node_sephsva_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SeparateHSVAShaderNode : public ShaderNode {
public:
@@ -94,7 +94,7 @@ static void cmp_node_combhsva_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CombineHSVAShaderNode : public ShaderNode {
public:

View File

@@ -27,7 +27,7 @@ static void cmp_node_seprgba_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SeparateRGBAShaderNode : public ShaderNode {
public:
@@ -94,7 +94,7 @@ static void cmp_node_combrgba_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CombineRGBAShaderNode : public ShaderNode {
public:

View File

@@ -30,7 +30,7 @@ static void cmp_node_separate_xyz_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Z");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SeparateXYZShaderNode : public ShaderNode {
public:
@@ -91,7 +91,7 @@ static void cmp_node_combine_xyz_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Vector>("Vector");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CombineXYZShaderNode : public ShaderNode {
public:

View File

@@ -34,7 +34,7 @@ static void node_composit_init_mode_sepycca(bNodeTree * /*ntree*/, bNode *node)
node->custom1 = 1; /* BLI_YCC_ITU_BT709 */
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SeparateYCCAShaderNode : public ShaderNode {
public:
@@ -127,7 +127,7 @@ static void node_composit_init_mode_combycca(bNodeTree * /*ntree*/, bNode *node)
node->custom1 = 1; /* BLI_YCC_ITU_BT709 */
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CombineYCCAShaderNode : public ShaderNode {
public:

View File

@@ -27,7 +27,7 @@ static void cmp_node_sepyuva_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("A").translation_context(BLT_I18NCONTEXT_COLOR);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SeparateYUVAShaderNode : public ShaderNode {
public:
@@ -94,7 +94,7 @@ static void cmp_node_combyuva_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Image");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class CombineYUVAShaderNode : public ShaderNode {
public:

View File

@@ -52,7 +52,7 @@ static void node_composit_buts_set_alpha(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(layout, ptr, "mode", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static CMPNodeSetAlphaMode get_mode(const bNode &node)
{

View File

@@ -44,7 +44,7 @@ static void node_composit_buts_split(uiLayout *layout, bContext * /*C*/, Pointer
uiItemR(col, ptr, "factor", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SplitOperation : public NodeOperation {
public:

View File

@@ -66,7 +66,7 @@ static void node_composit_buts_stabilize2d(uiLayout *layout, bContext *C, Pointe
uiItemR(layout, ptr, "invert", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class Stabilize2DOperation : public NodeOperation {
public:

View File

@@ -52,7 +52,7 @@ static void node_composit_buts_sunbeams(uiLayout *layout, bContext * /*C*/, Poin
ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SunBeamsOperation : public NodeOperation {
public:

View File

@@ -29,7 +29,7 @@ static void node_composit_buts_switch(uiLayout *layout, bContext * /*C*/, Pointe
uiItemR(layout, ptr, "check", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SwitchOperation : public NodeOperation {
public:

View File

@@ -52,7 +52,7 @@ static void init_switch_view(const bContext *C, PointerRNA *ptr)
id_us_plus(node->id);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class SwitchViewOperation : public NodeOperation {
public:

View File

@@ -32,7 +32,7 @@ static void cmp_node_texture_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>("Color");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class TextureOperation : public NodeOperation {
public:

View File

@@ -89,7 +89,7 @@ static void node_composit_buts_tonemap(uiLayout *layout, bContext * /*C*/, Point
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ToneMapOperation : public NodeOperation {
public:

View File

@@ -103,7 +103,7 @@ static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRN
}
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class TrackPositionOperation : public NodeOperation {
public:

View File

@@ -57,7 +57,7 @@ static void node_composit_buts_transform(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(layout, ptr, "filter_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class TransformOperation : public NodeOperation {
public:

View File

@@ -53,7 +53,7 @@ static void node_composit_buts_translate(uiLayout *layout, bContext * /*C*/, Poi
uiItemR(layout, ptr, "wrap_axis", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class TranslateOperation : public NodeOperation {
public:

View File

@@ -45,7 +45,7 @@ static void node_composit_init_valtorgb(bNodeTree * /*ntree*/, bNode *node)
node->storage = BKE_colorband_add(true);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
static ColorBand *get_color_band(const bNode &node)
{
@@ -178,7 +178,7 @@ static void cmp_node_rgbtobw_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Val");
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class RGBToBWShaderNode : public ShaderNode {
public:

View File

@@ -19,7 +19,7 @@ static void cmp_node_value_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>("Value").default_value(0.5f);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ValueOperation : public NodeOperation {
public:

View File

@@ -66,7 +66,7 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext * /*C*/, Point
uiItemR(col, ptr, "factor", UI_ITEM_R_SPLIT_EMPTY_NAME, IFACE_("Blur"), ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
#define MOTION_BLUR_TILE_SIZE 32
#define DEPTH_SCALE 100.0f

View File

@@ -49,7 +49,7 @@ static void node_composit_buts_viewer(uiLayout *layout, bContext * /*C*/, Pointe
uiItemR(layout, ptr, "use_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ViewerOperation : public NodeOperation {
public:

View File

@@ -56,7 +56,7 @@ static void node_composit_buts_zcombine(uiLayout *layout, bContext * /*C*/, Poin
uiItemR(col, ptr, "use_antialias_z", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE);
}
using namespace blender::realtime_compositor;
using namespace blender::compositor;
class ZCombineOperation : public NodeOperation {
public:

View File

@@ -6,10 +6,10 @@
#include <memory>
namespace blender::realtime_compositor {
namespace blender::compositor {
class RenderContext;
class Profiler;
} // namespace blender::realtime_compositor
} // namespace blender::compositor
struct bNodeTree;
struct Render;
@@ -33,8 +33,8 @@ void RE_compositor_execute(Render &render,
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler);
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler);
/* Free compositor caches. */
void RE_compositor_free(Render &render);

View File

@@ -48,16 +48,16 @@ namespace blender::render {
* TODO: should share pool with draw manager. It needs some globals initialization figured out
* there first.
*/
class TexturePool : public realtime_compositor::TexturePool {
class TexturePool : public compositor::TexturePool {
private:
/** Textures that are not yet used and are available to be acquired. After evaluation, any
* texture in this map should be freed because it was not acquired in the evaluation and is thus
* unused. Textures removed from this map should be moved to the textures_in_use_ map when
* acquired. */
Map<realtime_compositor::TexturePoolKey, Vector<GPUTexture *>> available_textures_;
Map<compositor::TexturePoolKey, Vector<GPUTexture *>> available_textures_;
/** Textures that were acquired in this compositor evaluation. After evaluation, those textures
* are moved to the available_textures_ map to be acquired in the next evaluation. */
Map<realtime_compositor::TexturePoolKey, Vector<GPUTexture *>> textures_in_use_;
Map<compositor::TexturePoolKey, Vector<GPUTexture *>> textures_in_use_;
public:
virtual ~TexturePool()
@@ -77,7 +77,7 @@ class TexturePool : public realtime_compositor::TexturePool {
GPUTexture *allocate_texture(int2 size, eGPUTextureFormat format) override
{
const realtime_compositor::TexturePoolKey key(size, format);
const compositor::TexturePoolKey key(size, format);
Vector<GPUTexture *> &available_textures = available_textures_.lookup_or_add_default(key);
GPUTexture *texture = nullptr;
if (available_textures.is_empty()) {
@@ -128,15 +128,15 @@ class ContextInputData {
const RenderData *render_data;
const bNodeTree *node_tree;
std::string view_name;
realtime_compositor::RenderContext *render_context;
realtime_compositor::Profiler *profiler;
compositor::RenderContext *render_context;
compositor::Profiler *profiler;
ContextInputData(const Scene &scene,
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
realtime_compositor::RenderContext *render_context,
realtime_compositor::Profiler *profiler)
compositor::RenderContext *render_context,
compositor::Profiler *profiler)
: scene(&scene),
render_data(&render_data),
node_tree(&node_tree),
@@ -149,16 +149,16 @@ class ContextInputData {
/* Render Context Data */
class Context : public realtime_compositor::Context {
class Context : public compositor::Context {
private:
/* Input data. */
ContextInputData input_data_;
/* Output combined result. */
realtime_compositor::Result output_result_;
compositor::Result output_result_;
/* Viewer output result. */
realtime_compositor::Result viewer_output_result_;
compositor::Result viewer_output_result_;
/* Cached GPU and CPU passes that the compositor took ownership of. Those had their reference
* count incremented when accessed and need to be freed/have their reference count decremented
@@ -168,10 +168,10 @@ class Context : public realtime_compositor::Context {
public:
Context(const ContextInputData &input_data, TexturePool &texture_pool)
: realtime_compositor::Context(texture_pool),
: compositor::Context(texture_pool),
input_data_(input_data),
output_result_(this->create_result(realtime_compositor::ResultType::Color)),
viewer_output_result_(this->create_result(realtime_compositor::ResultType::Color))
output_result_(this->create_result(compositor::ResultType::Color)),
viewer_output_result_(this->create_result(compositor::ResultType::Color))
{
}
@@ -242,7 +242,7 @@ class Context : public realtime_compositor::Context {
return render_region;
}
realtime_compositor::Result get_output_result() override
compositor::Result get_output_result() override
{
const int2 render_size = get_render_size();
if (output_result_.is_allocated()) {
@@ -262,10 +262,9 @@ class Context : public realtime_compositor::Context {
return output_result_;
}
realtime_compositor::Result get_viewer_output_result(
realtime_compositor::Domain domain,
const bool is_data,
realtime_compositor::ResultPrecision precision) override
compositor::Result get_viewer_output_result(compositor::Domain domain,
const bool is_data,
compositor::ResultPrecision precision) override
{
viewer_output_result_.set_transformation(domain.transformation);
viewer_output_result_.meta_data.is_non_color_data = is_data;
@@ -290,53 +289,53 @@ class Context : public realtime_compositor::Context {
return viewer_output_result_;
}
realtime_compositor::Result get_pass(const Scene *scene,
int view_layer_id,
const char *pass_name) override
compositor::Result get_pass(const Scene *scene,
int view_layer_id,
const char *pass_name) override
{
if (!scene) {
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
ViewLayer *view_layer = static_cast<ViewLayer *>(
BLI_findlink(&scene->view_layers, view_layer_id));
if (!view_layer) {
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
Render *render = RE_GetSceneRender(scene);
if (!render) {
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
RenderResult *render_result = RE_AcquireResultRead(render);
if (!render_result) {
RE_ReleaseResult(render);
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
RenderLayer *render_layer = RE_GetRenderLayer(render_result, view_layer->name);
if (!render_layer) {
RE_ReleaseResult(render);
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
RenderPass *render_pass = RE_pass_find_by_name(
render_layer, pass_name, this->get_view_name().data());
if (!render_pass) {
RE_ReleaseResult(render);
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
if (!render_pass || !render_pass->ibuf || !render_pass->ibuf->float_buffer.data) {
RE_ReleaseResult(render);
return realtime_compositor::Result(*this);
return compositor::Result(*this);
}
const eGPUTextureFormat format = (render_pass->channels == 1) ? GPU_R32F :
(render_pass->channels == 3) ? GPU_RGB32F :
GPU_RGBA32F;
realtime_compositor::Result pass = realtime_compositor::Result(*this, format);
compositor::Result pass = compositor::Result(*this, format);
if (this->use_gpu()) {
GPUTexture *pass_texture = RE_pass_ensure_gpu_texture_cache(render, render_pass);
@@ -362,23 +361,23 @@ class Context : public realtime_compositor::Context {
return input_data_.view_name;
}
realtime_compositor::ResultPrecision get_precision() const override
compositor::ResultPrecision get_precision() const override
{
switch (input_data_.scene->r.compositor_precision) {
case SCE_COMPOSITOR_PRECISION_AUTO:
/* Auto uses full precision for final renders and half procession otherwise. */
if (this->render_context()) {
return realtime_compositor::ResultPrecision::Full;
return compositor::ResultPrecision::Full;
}
else {
return realtime_compositor::ResultPrecision::Half;
return compositor::ResultPrecision::Half;
}
case SCE_COMPOSITOR_PRECISION_FULL:
return realtime_compositor::ResultPrecision::Full;
return compositor::ResultPrecision::Full;
}
BLI_assert_unreachable();
return realtime_compositor::ResultPrecision::Full;
return compositor::ResultPrecision::Full;
}
void set_info_message(StringRef /*message*/) const override
@@ -402,7 +401,7 @@ class Context : public realtime_compositor::Context {
void populate_meta_data_for_pass(const Scene *scene,
int view_layer_id,
const char *pass_name,
realtime_compositor::MetaData &meta_data) const override
compositor::MetaData &meta_data) const override
{
if (!scene) {
return;
@@ -433,7 +432,7 @@ class Context : public realtime_compositor::Context {
struct StampCallbackData {
std::string cryptomatte_layer_name;
realtime_compositor::MetaData *meta_data;
compositor::MetaData *meta_data;
};
/* Go over the stamp data and add any Cryptomatte related meta data. */
@@ -592,12 +591,12 @@ class Context : public realtime_compositor::Context {
}
}
realtime_compositor::RenderContext *render_context() const override
compositor::RenderContext *render_context() const override
{
return input_data_.render_context;
}
realtime_compositor::Profiler *profiler() const override
compositor::Profiler *profiler() const override
{
return input_data_.profiler;
}
@@ -633,7 +632,7 @@ class RealtimeCompositor {
* changed them since the last evaluation. See the needs_to_be_recreated method for more info on
* why those are needed. */
bool uses_gpu_;
realtime_compositor::ResultPrecision used_precision_;
compositor::ResultPrecision used_precision_;
public:
RealtimeCompositor(Render &render, const ContextInputData &input_data) : render_(render)
@@ -704,7 +703,7 @@ class RealtimeCompositor {
/* Always recreate the evaluator, as this only runs on compositing node changes and
* there is no reason to cache this. Unlike the viewport where it helps for navigation. */
{
realtime_compositor::Evaluator evaluator(*context_);
compositor::Evaluator evaluator(*context_);
evaluator.evaluate();
}
@@ -744,8 +743,8 @@ void Render::compositor_execute(const Scene &scene,
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler)
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler)
{
std::unique_lock lock(this->compositor_mutex);
@@ -784,8 +783,8 @@ void RE_compositor_execute(Render &render,
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler)
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler)
{
render.compositor_execute(scene, render_data, node_tree, view_name, render_context, profiler);
}

View File

@@ -1373,7 +1373,7 @@ static void do_render_compositor(Render *re)
/* If we have consistent depsgraph now would be a time to update them. */
}
blender::realtime_compositor::RenderContext compositor_render_context;
blender::compositor::RenderContext compositor_render_context;
LISTBASE_FOREACH (RenderView *, rv, &re->result->views) {
ntreeCompositExecTree(re,
re->pipeline_scene_eval,

View File

@@ -23,10 +23,10 @@
#include "tile_highlight.h"
namespace blender::realtime_compositor {
namespace blender::compositor {
class RenderContext;
class Profiler;
} // namespace blender::realtime_compositor
} // namespace blender::compositor
struct bNodeTree;
struct Depsgraph;
@@ -50,8 +50,8 @@ struct BaseRender {
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler) = 0;
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler) = 0;
virtual void compositor_free() = 0;
virtual void display_init(RenderResult *render_result) = 0;
@@ -102,8 +102,8 @@ struct ViewRender : public BaseRender {
const RenderData & /*render_data*/,
const bNodeTree & /*node_tree*/,
const char * /*view_name*/,
blender::realtime_compositor::RenderContext * /*render_context*/,
blender::realtime_compositor::Profiler * /*profiler*/) override
blender::compositor::RenderContext * /*render_context*/,
blender::compositor::Profiler * /*profiler*/) override
{
}
void compositor_free() override {}
@@ -147,8 +147,8 @@ struct Render : public BaseRender {
const RenderData &render_data,
const bNodeTree &node_tree,
const char *view_name,
blender::realtime_compositor::RenderContext *render_context,
blender::realtime_compositor::Profiler *profiler) override;
blender::compositor::RenderContext *render_context,
blender::compositor::Profiler *profiler) override;
void compositor_free() override;
void display_init(RenderResult *render_result) override;