[Bf-blender-cvs] [82251e8] compositor-2016: Add TODO about vertex color linearization to GLSL code
Sergey Sharybin
noreply at git.blender.org
Wed Jun 8 21:49:38 CEST 2016
Commit: 82251e87c5e780231f608730a27399bff7b9b535
Author: Sergey Sharybin
Date: Mon May 23 14:43:03 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rB82251e87c5e780231f608730a27399bff7b9b535
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.
===================================================================
M source/blender/gpu/shaders/gpu_shader_material.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 4d7f6d5..9ac9bf0 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;
More information about the Bf-blender-cvs
mailing list