diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-09-15 15:33:22 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-15 15:33:22 +0300 |
commit | 8f7ab269355bf9d15ad5b405017c1a7eb486d64f (patch) | |
tree | 9caac6d02b75e67530a5642985ed3d924f10a0e4 | |
parent | 78ea6302f1c45992dd1166cc3978a2ba4201d638 (diff) |
Revert "Image Editor: Make Rendering of Pure Emissive Colors Optional"
This reverts commit f492c8d488b7eb2166ca894e10a8128a1678a885.
6 files changed, 2 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 57feeb04eee..fa71bc1d14d 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -989,7 +989,6 @@ class IMAGE_PT_view_display(Panel): row = col.row() row.active = ima.source != 'TILED' row.prop(sima, "show_repeat", text="Repeat Image") - col.prop(sima, "show_pure_emissive_colors") if show_uvedit: col.prop(uvedit, "show_pixel_coords", text="Pixel Coordinates") diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index c1fb38a5d87..213fbe0bde0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3396,9 +3396,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { switch (sl->spacetype) { case SPACE_IMAGE: { - const int si_flag_unused_3 = (1 << 3); SpaceImage *sima = (SpaceImage *)sl; - sima->flag &= ~(SI_FLAG_UNUSED_0 | SI_FLAG_UNUSED_1 | si_flag_unused_3 | + sima->flag &= ~(SI_FLAG_UNUSED_0 | SI_FLAG_UNUSED_1 | SI_FLAG_UNUSED_3 | SI_FLAG_UNUSED_6 | SI_FLAG_UNUSED_7 | SI_FLAG_UNUSED_8 | SI_FLAG_UNUSED_17 | SI_FLAG_UNUSED_18 | SI_FLAG_UNUSED_23 | SI_FLAG_UNUSED_24); diff --git a/source/blender/draw/engines/image/image_engine.c b/source/blender/draw/engines/image/image_engine.c index 99c812859c1..90bfb38dadf 100644 --- a/source/blender/draw/engines/image/image_engine.c +++ b/source/blender/draw/engines/image/image_engine.c @@ -43,7 +43,6 @@ #define SIMA_DRAW_FLAG_SHUFFLING (1 << 2) #define SIMA_DRAW_FLAG_DEPTH (1 << 3) #define SIMA_DRAW_FLAG_DO_REPEAT (1 << 4) -#define SIMA_DRAW_FLAG_PURE_EMISSIVE (1 << 5) static void image_cache_image_add(DRWShadingGroup *grp, Image *image) { @@ -143,7 +142,6 @@ static void image_cache_image(IMAGE_Data *vedata, Image *image, ImageUser *iuser const bool is_tiled_texture = tex_tile_data != NULL; const bool do_repeat = (!is_tiled_texture) && ((sima->flag & SI_DRAW_TILE) != 0); const bool is_zoom_out = sima->zoom < 1.0f; - const bool show_pure_emissive_colors = (sima->flag & SI_SHOW_PURE_EMISSIVE) != 0; /* use interpolation filtering when zooming out */ eGPUSamplerState state = 0; @@ -151,7 +149,6 @@ static void image_cache_image(IMAGE_Data *vedata, Image *image, ImageUser *iuser int draw_flags = 0; SET_FLAG_FROM_TEST(draw_flags, do_repeat, SIMA_DRAW_FLAG_DO_REPEAT); - SET_FLAG_FROM_TEST(draw_flags, show_pure_emissive_colors, SIMA_DRAW_FLAG_PURE_EMISSIVE); if ((sima->flag & SI_USE_ALPHA) != 0) { /* Show RGBA */ diff --git a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl index f6a3e1affb9..bbff06845a8 100644 --- a/source/blender/draw/engines/image/shaders/engine_image_frag.glsl +++ b/source/blender/draw/engines/image/shaders/engine_image_frag.glsl @@ -6,7 +6,6 @@ #define SIMA_DRAW_FLAG_SHUFFLING (1 << 2) #define SIMA_DRAW_FLAG_DEPTH (1 << 3) #define SIMA_DRAW_FLAG_DO_REPEAT (1 << 4) -#define SIMA_DRAW_FLAG_PURE_EMISSIVE (1 << 5) #ifdef TILED_IMAGE uniform sampler2DArray imageTileArray; @@ -75,12 +74,6 @@ void main() tex_color = texture(imageTexture, uvs_clamped); #endif - if ((drawFlags & SIMA_DRAW_FLAG_PURE_EMISSIVE) == 0) { - if (imgPremultiplied && tex_color.a == 0.0) { - tex_color.rgb = vec3(0.0); - } - } - if ((drawFlags & SIMA_DRAW_FLAG_APPLY_ALPHA) != 0) { if (!imgPremultiplied) { tex_color.rgb *= tex_color.a; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 66c87c85ffd..06ab01a9730 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1131,7 +1131,7 @@ typedef enum eSpaceImage_Flag { SI_FLAG_UNUSED_0 = (1 << 0), /* cleared */ SI_FLAG_UNUSED_1 = (1 << 1), /* cleared */ SI_CLIP_UV = (1 << 2), - SI_SHOW_PURE_EMISSIVE = (1 << 3), + SI_FLAG_UNUSED_3 = (1 << 3), /* cleared */ SI_NO_DRAWFACES = (1 << 4), SI_DRAWSHADOW = (1 << 5), SI_FLAG_UNUSED_6 = (1 << 6), /* cleared */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 6890515b7b3..317759ce418 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -4571,11 +4571,6 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_update( prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_show_stereo_update"); - prop = RNA_def_property(srna, "show_pure_emissive_colors", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SHOW_PURE_EMISSIVE); - RNA_def_property_ui_text(prop, "Show Pure Emissive", "Display the image with pure emissive colors"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); - /* uv */ prop = RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); |