forked from bartvdbraak/blender
cycles separateRGB: fix for cuda kernel building.
Array indexing doesn't work there. I'm yet to setup my CUDA computer, in the meantime this proved to work (tested by Daniel Salazar). If I found other ways of doing it I get back to that.
This commit is contained in:
parent
0cff8e6c9c
commit
1da758ffff
@ -30,8 +30,14 @@ __device void svm_node_separate_rgb(ShaderData *sd, float *stack, uint icolor_of
|
||||
{
|
||||
float3 color = stack_load_float3(stack, icolor_offset);
|
||||
|
||||
if (stack_valid(out_offset))
|
||||
stack_store_float(stack, out_offset, color[color_index]);
|
||||
if (stack_valid(out_offset)) {
|
||||
if (color_index == 0)
|
||||
stack_store_float(stack, out_offset, color.x);
|
||||
else if (color_index == 1)
|
||||
stack_store_float(stack, out_offset, color.y);
|
||||
else
|
||||
stack_store_float(stack, out_offset, color.z);
|
||||
}
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
Loading…
Reference in New Issue
Block a user