Page 1 of 1

PathOCL bug with Split RGB/Combine RGB nodes

Posted: Sun Jul 07, 2019 12:20 pm
by mdklux
When I tried to change a bit a colour of texture using Split RGB and Combine RGB node (in PathOCL+Sobol) I've get an error ending with:

Code: Select all

ERROR clBuildProgram[CL_BUILD_PROGRAM_FAILURE]:
<kernel>:9135:9: error: subscripted access is not allowed for OpenCL vectors
        return tex[channel];
               ^   ~~~~~~~
<kernel>:9140:23: error: subscripted access is not allowed for OpenCL vectors
        const float result = tex[channel];
                             ^   ~~~~~~~
RenderSession starting error: 
PathOCLBase kernel compilation error
In Path+CPU+Sobol all works well.
When I disable Split/Combine RGB nodes and use the base texture colour it works on both CPU and OCL modes.

LuxCoreRender version - v2.2beta2
Error raises both in Blender and in standalone version.

In attachment image:
1) colour I want to get
2) material node setup that works CPU only
3) render with Path+CPU+Sobol
4) error when I try to switch to PathOCL in blender
5) material node setup without using Split RGB and Combine RGB node
6) render with PathOCL+Sobol

P.S. graphic card used - Nvidia GTX 780

Re: PathOCL bug with Split RGB/Combine RGB nodes

Posted: Sun Jul 07, 2019 1:29 pm
by B.Y.O.B.
Thanks for the report, I fixed the bug.

By the way, in the special case of your setup it looks like you don't need to split the channels.
Instead of "split -> multiply -> combine", just use "multiply".

Re: PathOCL bug with Split RGB/Combine RGB nodes

Posted: Sun Jul 07, 2019 2:02 pm
by mdklux
Thank you.

I did the split to multiply they by different values separately.

Re: PathOCL bug with Split RGB/Combine RGB nodes

Posted: Sun Jul 07, 2019 2:04 pm
by B.Y.O.B.
You can do that in the multiply texture as well. The second slot is a color, which means you have three channels (R, G, B).
For example, multiply with the color (0.8, 0.5, 1).

Re: PathOCL bug with Split RGB/Combine RGB nodes

Posted: Sun Jul 07, 2019 2:12 pm
by mdklux
Oh, I got it. Thanks.