644fb2b679 fixed a long standing issue
that offscreen example showed the wrong colors. However the fix assumes
that input texture color space is always sRGB.
This adds a shader variation that draws textures that are stored in scene referred
linear color space (like all of our Image data-block).
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/147788
19 lines
505 B
GLSL
19 lines
505 B
GLSL
/* SPDX-FileCopyrightText: 2016-2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "infos/gpu_shader_3D_image_infos.hh"
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_3D_image)
|
|
|
|
#include "gpu_shader_colorspace_lib.glsl"
|
|
|
|
void main()
|
|
{
|
|
fragColor = texture(image, texCoord_interp);
|
|
#ifdef BLENDER_SCENE_LINEAR_TO_REC709
|
|
fragColor = blender_scene_linear_to_rec709_srgb(gpu_scene_linear_to_rec709, fragColor);
|
|
#endif
|
|
fragColor = blender_rec709_srgb_to_output_space(fragColor);
|
|
}
|