Blender  V2.93
COM_MixOperation.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #pragma once
20 
21 #include "COM_NodeOperation.h"
22 
23 namespace blender::compositor {
24 
31  protected:
39  bool m_useClamp;
40 
41  inline void clampIfNeeded(float color[4])
42  {
43  if (m_useClamp) {
44  clamp_v4(color, 0.0f, 1.0f);
45  }
46  }
47 
48  public:
53 
57  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
58 
62  void initExecution() override;
63 
67  void deinitExecution() override;
68 
69  void determineResolution(unsigned int resolution[2],
70  unsigned int preferredResolution[2]) override;
71 
72  void setUseValueAlphaMultiply(const bool value)
73  {
74  this->m_valueAlphaMultiply = value;
75  }
76  inline bool useValueAlphaMultiply()
77  {
78  return this->m_valueAlphaMultiply;
79  }
80  void setUseClamp(bool value)
81  {
82  this->m_useClamp = value;
83  }
84 };
85 
87  public:
88  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
89 };
90 
92  public:
93  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
94 };
95 
97  public:
98  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
99 };
100 
102  public:
103  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
104 };
105 
107  public:
108  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
109 };
110 
112  public:
113  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
114 };
115 
117  public:
118  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
119 };
120 
122  public:
123  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
124 };
125 
127  public:
128  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
129 };
130 
132  public:
133  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
134 };
135 
137  public:
138  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
139 };
140 
142  public:
143  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
144 };
145 
147  public:
148  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
149 };
150 
152  public:
153  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
154 };
155 
157  public:
158  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
159 };
160 
162  public:
163  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
164 };
165 
167  public:
168  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
169 };
170 
172  public:
173  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
174 };
175 
177  public:
178  void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override;
179 };
180 
181 } // namespace blender::compositor
MINLINE void clamp_v4(float vec[4], const float min, const float max)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define output
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void setUseValueAlphaMultiply(const bool value)
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) override
determine the resolution of this node
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override
NodeOperation contains calculation logic.