diff options
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl index 722add22a89..2ce816c6484 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_prepass_frag.glsl @@ -6,6 +6,7 @@ uniform float materialRoughness; uniform sampler2D image; uniform float ImageTransparencyCutoff = 0.1; +uniform bool imageSrgb; #ifdef NORMAL_VIEWPORT_PASS_ENABLED in vec3 normal_viewport; @@ -40,6 +41,9 @@ void main() if (color.a < ImageTransparencyCutoff) { discard; } + if (imageSrgb) { + color = srgb_to_linearrgb(color); + } # else color.rgb = materialDiffuseColor; # endif |