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

compositor_convert_color_to_float.glsl « compositor « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27b0b9a231cebd933e548f03481a6f21c02d9bf4 (plain)
1
2
3
4
5
6
7
8
9
/* Store the average of the input's three color channels in the output, the alpha channel is
 * ignored. */

void main()
{
  ivec2 xy = ivec2(gl_GlobalInvocationID.xy);
  vec4 color = texelFetch(input_sampler, xy, 0);
  imageStore(output_image, xy, vec4((color.r + color.g + color.b) / 3.0));
}