Fix T75750 Image Editor: Rendered result is much brighter than in viewport

This commit is contained in:
Clément Foucault 2020-04-15 23:34:19 +02:00
parent e0d7b6c78d
commit f0221ff667
Notes: blender-bot 2023-02-13 22:51:21 +01:00
Referenced by commit 3ea4d3dc07, Fix (unreported) Image Editor UI drawing too dark
Referenced by issue #75856, Backface culling viewport setting doesn't update right away
Referenced by issue #75767, Cycles renders image too bright compare to old builds
Referenced by issue #75750, Rendered result is much brighter than in viewport
1 changed files with 5 additions and 0 deletions

View File

@ -669,9 +669,14 @@ static void image_main_region_draw(const bContext *C, ARegion *region)
/* we set view2d from own zoom and offset each time */
image_main_region_set_view2d(sima, region);
/* Image are still drawn in display space. */
glDisable(GL_FRAMEBUFFER_SRGB);
/* we draw image in pixelspace */
draw_image_main(C, region);
glEnable(GL_FRAMEBUFFER_SRGB);
/* and uvs in 0.0-1.0 space */
UI_view2d_view_ortho(v2d);