Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-05-23 15:43:03 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-23 15:43:03 +0300
commit66dceb2bedd2184f00a71513fa80fd56fc5f8ed2 (patch)
tree7b0588ff23cf88f1785abc7b9aad047e0ea52de8 /source/blender/gpu/shaders
parent12f86a4e48c1cb448d4a07201118a7fb1cc8ce7d (diff)
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.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl3
1 files changed, 3 insertions, 0 deletions
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;