blob: b2b474fb1dd32119733e013cf8c4d68c207e404a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
__kernel void gegl_brightness_contrast(__global const float4 *in,
__global float4 *out,
float contrast,
float brightness)
{
int gid = get_global_id(0);
float4 in_v = in[gid];
float4 out_v;
out_v.xyz = (in_v.xyz - 0.5f) * contrast + brightness + 0.5f;
out_v.w = in_v.w;
out[gid] = out_v;
}
|