Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Copyright 2011 Blender Foundation. */
|
|
|
|
#pragma once
|
|
|
|
#include "COM_NodeOperation.h"
|
|
|
|
namespace blender::compositor {
|
|
|
|
/**
|
|
* \brief Pixelate operation
|
|
*
|
|
* The Tile compositor is by default sub-pixel accurate.
|
|
* For some setups you don want this.
|
|
* This operation will remove the sub-pixel accuracy
|
|
*/
|
|
class PixelateOperation : public NodeOperation {
|
|
private:
|
|
/**
|
|
* \brief cached reference to the input operation
|
|
*/
|
|
SocketReader *input_operation_;
|
|
|
|
public:
|
|
/**
|
|
* \brief PixelateOperation
|
|
* \param data_type: the datatype to create this operator for (saves datatype conversions)
|
|
*/
|
|
PixelateOperation(DataType data_type);
|
|
|
|
/**
|
|
* \brief initialization of the execution
|
|
*/
|
|
void init_execution() override;
|
|
|
|
/**
|
|
* \brief de-initialization of the execution
|
|
*/
|
|
void deinit_execution() override;
|
|
|
|
/**
|
|
* \brief execute_pixel
|
|
* \param output: result
|
|
* \param x: x-coordinate
|
|
* \param y: y-coordinate
|
|
* \param sampler: sampler
|
|
*/
|
|
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
|
|
};
|
|
|
|
} // namespace blender::compositor
|