Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_SetAlphaMultiplyOperation.h
- This file was moved from source/blender/compositor/operations/COM_KeyingSetAlphaOperation.h.
| /* | /* | ||||
| * This program is free software; you can redistribute it and/or | * This program is free software; you can redistribute it and/or | ||||
| * modify it under the terms of the GNU General Public License | * modify it under the terms of the GNU General Public License | ||||
| * as published by the Free Software Foundation; either version 2 | * as published by the Free Software Foundation; either version 2 | ||||
| * of the License, or (at your option) any later version. | * of the License, or (at your option) any later version. | ||||
| * | * | ||||
| * This program is distributed in the hope that it will be useful, | * This program is distributed in the hope that it will be useful, | ||||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
| * GNU General Public License for more details. | * GNU General Public License for more details. | ||||
| * | * | ||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * Copyright 2020, Blender Foundation. | * Copyright 2011, Blender Foundation. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "COM_NodeOperation.h" | #include "COM_NodeOperation.h" | ||||
| /** | /** | ||||
| * Operation which is used by keying node to modify image's alpha channels. | * This operation will apply a mask to its input image. | ||||
| * It keeps color properly pre-multiplied. | * | ||||
| * `output color.rgba = input color.rgba * input alpha` | |||||
| */ | */ | ||||
EAW: [Comments should always start with a capital letter and end with a full stop.](https://wiki. | |||||
| class KeyingSetAlphaOperation : public NodeOperation { | class SetAlphaMultiplyOperation : public NodeOperation { | ||||
| private: | private: | ||||
| SocketReader *m_inputColor; | SocketReader *m_inputColor; | ||||
| SocketReader *m_inputAlpha; | SocketReader *m_inputAlpha; | ||||
| public: | public: | ||||
| KeyingSetAlphaOperation(); | SetAlphaMultiplyOperation(); | ||||
| void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); | void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); | ||||
Done Inline ActionsEAW: [Comments should always start with a capital letter and end with a full stop.](https://wiki. | |||||
| void initExecution(); | void initExecution(); | ||||
| void deinitExecution(); | void deinitExecution(); | ||||
| }; | }; | ||||
Comments should always start with a capital letter and end with a full stop.
I could understand this description being used (for example) to describe the RGB to BW operation, where 3 input channels are combined into a single value output channel. I don't see how it accurately describes the SetAlphaMultiply operation, unless I am misunderstanding something, which I do admit is quite possible. 😊
It does? Why? Should it? Doesn't this go against the rest of the compositor assuming a linear space?