2023-08-24 10:54:59 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2022 Blender Authors
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
|
|
2024-10-04 15:48:22 +02:00
|
|
|
#include "gpu_shader_compositor_texture_utilities.glsl"
|
2022-10-20 16:31:35 +02:00
|
|
|
|
|
|
|
|
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));
|
|
|
|
|
}
|