blob: 06d1560d4d84805ea9e3918d300f472ad8d8eb8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
static const char* opacity_cl_source =
"__kernel void gegl_opacity_RaGaBaA_float (__global const float4 *in, \n"
" __global const float *aux, \n"
" __global float4 *out, \n"
" float value) \n"
"{ \n"
" int gid = get_global_id(0); \n"
" float4 in_v = in [gid]; \n"
" float aux_v = (aux)? aux[gid] : 1.0f; \n"
" float4 out_v; \n"
" out_v = in_v * aux_v * value; \n"
" out[gid] = out_v; \n"
"} \n"
"__kernel void gegl_opacity_RGBA_float (__global const float4 *in, \n"
" __global const float *aux, \n"
" __global float4 *out, \n"
" float value) \n"
"{ \n"
" int gid = get_global_id(0); \n"
" float4 in_v = in [gid]; \n"
" float aux_v = (aux)? aux[gid] : 1.0f; \n"
" float4 out_v = (float4)(in_v.x, in_v.y, in_v.z, in_v.w * aux_v * value); \n"
" out[gid] = out_v; \n"
"} \n"
" \n"
;
|