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

compositor_normalize.glsl « compositor « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 53dfeb01730a41130c96bbc359fb8d8c171a1888 (plain)
1
2
3
4
5
6
7
8
9
10
#pragma BLENDER_REQUIRE(gpu_shader_compositor_texture_utilities.glsl)

void main()
{
  ivec2 texel = ivec2(gl_GlobalInvocationID.xy);
  float value = texture_load(input_tx, texel).x;
  float normalized_value = (value - minimum) * scale;
  float clamped_value = clamp(normalized_value, 0.0, 1.0);
  imageStore(output_img, texel, vec4(clamped_value));
}