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

gpu_shader_material_gamma.glsl « material « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5733992f8dd2852b4fa0ccea00827e5713b5459c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
void node_gamma(vec4 col, float gamma, out vec4 outcol)
{
  outcol = col;

  if (col.r > 0.0) {
    outcol.r = compatible_pow(col.r, gamma);
  }
  if (col.g > 0.0) {
    outcol.g = compatible_pow(col.g, gamma);
  }
  if (col.b > 0.0) {
    outcol.b = compatible_pow(col.b, gamma);
  }
}