Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/image/image_engine.c
| Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | if (pd->texture) { | ||||
| static float shuffle[4] = {1.0f, 1.0f, 1.0f, 1.0f}; | static float shuffle[4] = {1.0f, 1.0f, 1.0f, 1.0f}; | ||||
| static float far_near[2] = {100.0f, 0.0f}; | static float far_near[2] = {100.0f, 0.0f}; | ||||
| if (scene->camera && scene->camera->type == OB_CAMERA) { | if (scene->camera && scene->camera->type == OB_CAMERA) { | ||||
| far_near[1] = ((Camera *)scene->camera->data)->clip_start; | far_near[1] = ((Camera *)scene->camera->data)->clip_start; | ||||
| far_near[0] = ((Camera *)scene->camera->data)->clip_end; | far_near[0] = ((Camera *)scene->camera->data)->clip_end; | ||||
| } | } | ||||
| const bool use_premul_alpha = image->alpha_mode == IMA_ALPHA_PREMUL; | const bool use_premul_alpha = BKE_image_gpu_store_premultiplied(image, ibuf); | ||||
| const bool is_tiled_texture = tex_tile_data != NULL; | const bool is_tiled_texture = tex_tile_data != NULL; | ||||
| const bool do_repeat = (!is_tiled_texture) && ((sima->flag & SI_DRAW_TILE) != 0); | const bool do_repeat = (!is_tiled_texture) && ((sima->flag & SI_DRAW_TILE) != 0); | ||||
| int draw_flags = 0; | int draw_flags = 0; | ||||
| SET_FLAG_FROM_TEST(draw_flags, do_repeat, SIMA_DRAW_FLAG_DO_REPEAT); | SET_FLAG_FROM_TEST(draw_flags, do_repeat, SIMA_DRAW_FLAG_DO_REPEAT); | ||||
| if ((sima->flag & SI_USE_ALPHA) != 0) { | if ((sima->flag & SI_USE_ALPHA) != 0) { | ||||
| /* Show RGBA */ | /* Show RGBA */ | ||||
| draw_flags |= SIMA_DRAW_FLAG_SHOW_ALPHA | SIMA_DRAW_FLAG_APPLY_ALPHA; | draw_flags |= SIMA_DRAW_FLAG_SHOW_ALPHA | SIMA_DRAW_FLAG_APPLY_ALPHA; | ||||
| ▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines | |||||