27 for (
int i = 0; i < 4; i++) {
33 for (
int i = 0; i < 4; i++) {
44 float vec[3] = {
x,
y, 1.0f};
46 uv[0] = vec[0] / vec[2];
47 uv[1] = vec[1] / vec[2];
54 deriv[0][0] = (matrix[0][0] - matrix[0][2] * uv[0]) / vec[2];
55 deriv[1][0] = (matrix[0][1] - matrix[0][2] * uv[1]) / vec[2];
56 deriv[0][1] = (matrix[1][0] - matrix[1][2] * uv[0]) / vec[2];
57 deriv[1][1] = (matrix[1][1] - matrix[1][2] * uv[1]) / vec[2];
73 const int width =
image->get_width();
74 const int height =
image->get_height();
80 if (width == 0 || height == 0) {
85 float frame_corners[4][2] = {
100 for (; !it.is_end(); ++it) {
106 for (; !it.is_end(); ++it) {
120 const rcti &output_area,
123 if (input_idx != 0) {
124 r_input_area = output_area;
142 output_area.
ymin - 2,
147 output_area.
ymin - 2,
152 output_area.
ymax + 2,
157 output_area.
ymax + 2,
161 for (
int i = 0; i < 4; i++) {
166 r_input_area.
xmin =
min[0] - 1;
167 r_input_area.
ymin =
min[1] - 1;
168 r_input_area.
xmax =
max[0] + 1;
169 r_input_area.
ymax =
max[1] + 1;
185 float accumulated_mask = 0.0f;
190 sample.frame_space_corners[0],
191 sample.frame_space_corners[1],
192 sample.frame_space_corners[2]) ||
194 sample.frame_space_corners[0],
195 sample.frame_space_corners[2],
196 sample.frame_space_corners[3]);
197 accumulated_mask += is_inside_plane ? 1.0f : 0.0f;
void BKE_tracking_homography_between_two_quads(float reference_corners[4][2], float corners[4][2], float H[3][3])
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2])
void mul_m3_v3(const float M[3][3], float r[3])
void unit_m3(float m[3][3])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void add_v4_v4(float r[4], const float a[4])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE void zero_v4(float r[4])
#define INIT_MINMAX2(min, max)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
SIMD_FORCE_INLINE btVector3 normalized() const
Return a normalized version of this vector.
a MemoryBuffer contains access to the data
void read_elem_filtered(float x, float y, float dx[2], float dy[2], bool extend_boundary, float *out) const
NodeOperation contains calculation logic.
unsigned int get_height() const
void add_output_socket(DataType datatype)
unsigned int get_width() const
const rcti & get_canvas() const
NodeOperation * get_input_operation(int index)
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
MotionSample samples_[PLANE_DISTORT_MAX_SAMPLES]
PlaneDistortBaseOperation()
float motion_blur_shutter_
virtual void calculate_corners(const float corners[4][2], bool normalized, int sample)
PlaneDistortMaskOperation()
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
void calculate_corners(const float corners[4][2], bool normalized, int sample) override
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.
PlaneDistortWarpImageOperation()
input_tx image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "preview_img") .compute_source("compositor_compute_preview.glsl") .do_static_compilation(true)
draw_view in_light_buf[] float
BLI_INLINE void warp_coord(float x, float y, float matrix[3][3], float uv[2], float deriv[2][2])
typename BuffersIteratorBuilder< T >::Iterator BuffersIterator
VecBase< float, 2 > float2
static blender::bke::bNodeSocketTemplate inputs[]
float perspective_matrix[3][3]
float frame_space_corners[4][2]