Blender  V3.3
COM_MapUVOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #pragma once
5 
7 
8 namespace blender::compositor {
9 
11  private:
12  static constexpr int IMAGE_INPUT_INDEX = 0;
13  static constexpr int UV_INPUT_INDEX = 1;
17  SocketReader *inputUVProgram_;
18  SocketReader *input_color_program_;
19 
20  int uv_width_;
21  int uv_height_;
22  int image_width_;
23  int image_height_;
24 
25  float alpha_;
26 
27  std::function<void(float x, float y, float *out)> uv_input_read_fn_;
28 
29  public:
31 
36  ReadBufferOperation *read_operation,
37  rcti *output) override;
38 
42  void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
43 
44  void pixel_transform(const float xy[2], float r_uv[2], float r_deriv[2][2], float &r_alpha);
45 
46  void init_data() override;
47 
51  void init_execution() override;
52 
56  void deinit_execution() override;
57 
58  void set_alpha(float alpha)
59  {
60  alpha_ = alpha;
61  }
62 
63  void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override;
65  const rcti &area,
66  Span<MemoryBuffer *> inputs) override;
68  const rcti &area,
69  Span<MemoryBuffer *> inputs) override;
70 
71  private:
72  bool read_uv(float x, float y, float &r_u, float &r_v, float &r_alpha);
73 };
74 
75 } // namespace blender::compositor
_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
void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override
Get input operation area being read by this operation on rendering given output area.
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void update_memory_buffer_started(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
void pixel_transform(const float xy[2], float r_uv[2], float r_deriv[2][2], float &r_alpha)
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
a MemoryBuffer contains access to the data of a chunk
NodeOperation contains calculation logic.
SyclQueue void void size_t num_bytes void
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static bNodeSocketTemplate inputs[]
int xy[2]
Definition: wm_draw.c:135