Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __kernel void reconstruct( __write_only image2d_t backbuffer,
- __global float4* traceResult,
- const int num,
- const int w,
- const int h)
- {
- int idx = get_global_id(0);
- if(idx < num)
- {
- int2 coord = (int2)(idx % w, idx / w);
- float4 barycentric = traceResult[idx];
- barycentric.z = 1.0 - barycentric.x - barycentric.y;
- barycentric.w = 1.0;
- write_imagef(backbuffer, coord, barycentric);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement