OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

Precision or mathematic problem

Polar01
Beginner
545 Views
Hi,
I'm working on a rendering software (http://spectralbattle.wordpress.com/) and use several SDK to test my code. Using several SDK allow me to check if the errors are in my code... or in the SDK.
When I use the Intel SDK I have some problems :
Here is the same rendering with Intel SDK :
The problem can be seen on the top of the box, a "normal" sounds to be inversed !
The normal orientation is simply computed with a dot product like this :
int isInside = (dot(Ng, I) < 0);
N = isInside ? -Ng : Ng;
I have also try to compute directly the dot product (Ng.x*I.x+Ng.y*I.y+Ng.z*I.z) , but I have the same effect !
Maybe the error is somewhere, but what I see is that I don't have this problem with AMD SDK !
0 Kudos
1 Reply
Polar01
Beginner
545 Views
Finally,
I have found a way to fix it !
But really it is not related to my code ! I have just replace some operation with corresponding float3 operations and it works !
So, there is a bug somewhere :-P
Thanks
0 Kudos
Reply