1 __kernel void cl_texturize_canvas
(__global const float
* in
,
3 __global float
* sdata
,
13 int col
= get_global_id
(0);
14 int row
= get_global_id
(1);
15 int step
= components
+ has_alpha
;
16 int index
= step
* (row * get_global_size
(0) + col
);
17 int canvas_index
= ((x + col
) & 127) * xm
+
18 ((y + row
) & 127) * ym
+ offs
;
21 float tmp
= mult
* sdata
[canvas_index];
22 for(i=0; i<components; ++i)
24 color = tmp + in[index];
25 out[index++] = clamp(color,0.0f,1.0f);
28 out[index] = in[index];