92 if (
image->rr !=
nullptr) {
100 if (image_buffer ==
nullptr) {
104 if (image_buffer->
rect ==
nullptr && image_buffer->
rect_float ==
nullptr) {
111 float zero[4] = {0, 0, 0, 0};
113 *r_owns_texture =
true;
120 if (image_buffer->
zbuf) {
126 *r_owns_texture =
true;
131 *r_owns_texture =
true;
137 *r_owns_texture =
false;
141 *r_owns_texture =
false;
151 const float UNUSED(image_resolution[2]),
152 float r_uv_to_texture[4][4])
const override
157 float translate_x = scale_x * -region->
v2d.
cur.
xmin;
158 float translate_y = scale_y * -region->
v2d.
cur.
ymin;
160 r_uv_to_texture[0][0] = scale_x;
161 r_uv_to_texture[1][1] = scale_y;
162 r_uv_to_texture[3][0] = translate_x;
163 r_uv_to_texture[3][1] = translate_y;
struct GPUTexture * BKE_image_get_gpu_tiles(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
struct RenderPass * BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser)
void BKE_image_multiview_index(const struct Image *ima, struct ImageUser *iuser)
struct GPUTexture * BKE_image_get_gpu_texture(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
struct GPUTexture * BKE_image_get_gpu_tilemap(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
#define BLI_assert_msg(a, msg)
void unit_m4(float m[4][4])
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock)
struct Image * ED_space_image(const struct SpaceImage *sima)
int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf)
struct ImBuf * ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile)
struct GPUTexture GPUTexture
GPUTexture * GPU_texture_create_2d(const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data)
bool IMB_alpha_affects_rgb(const struct ImBuf *ibuf)
ImageUser * get_image_user() override
void get_shader_parameters(ShaderParameters &r_shader_parameters, ImBuf *image_buffer) override
ImBuf * acquire_image_buffer(Image *UNUSED(image), void **lock) override
void release_buffer(Image *UNUSED(image), ImBuf *image_buffer, void *lock) override
Image * get_image(Main *UNUSED(bmain)) override
bool use_tile_drawing() const override
Is (wrap) repeat option enabled in the space.
void get_gpu_textures(Image *image, ImageUser *iuser, ImBuf *image_buffer, GPUTexture **r_gpu_texture, bool *r_owns_texture, GPUTexture **r_tex_tile_data) override
void init_ss_to_texture_matrix(const ARegion *region, const float UNUSED(image_resolution[2]), float r_uv_to_texture[4][4]) const override
SpaceImageAccessor(SpaceImage *sima)
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img GPU_RGBA16F
#define IMAGE_DRAW_FLAG_SHOW_ALPHA
#define IMAGE_DRAW_FLAG_SHUFFLING
#define IMAGE_DRAW_FLAG_APPLY_ALPHA
#define IMAGE_DRAW_FLAG_DEPTH