From 66dceb2bedd2184f00a71513fa80fd56fc5f8ed2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 23 May 2016 14:43:03 +0200 Subject: [PATCH] Add TODO about vertex color linearization to GLSL code It's not really clear at this moment how we can detect cases when attribute needs linearization. For now added a comment so we don't forget about this, hopefully. --- source/blender/gpu/shaders/gpu_shader_material.glsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 4d7f6d5b44c..9ac9bf020ed 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -2614,6 +2614,9 @@ void node_gamma(vec4 col, float gamma, out vec4 outcol) void node_attribute(vec3 attr, out vec4 outcol, out vec3 outvec, out float outf) { + /* TODO(sergey): This needs linearization for vertex color. + * But how to detect cases when input is linear and when it's srgb? + */ outcol = vec4(attr, 1.0); outvec = attr; outf = (attr.x + attr.y + attr.z)/3.0;