X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FRayTracingDevice.cu;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FRayTracingDevice.cu;h=22d05d145e6bad20b5b4f0a9ce478246fa8a187b;hp=97fc8399dbb5beead67fbd588770d8a4d9b155e3;hb=1c4b2276e7157acde9a3014b68d5d1667a7d6a44;hpb=f8259dce248a4411c3bc64cecb9fc268c4fd81d6 diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.cu b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.cu index 97fc839..22d05d1 100644 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.cu +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/RayTracingDevice.cu @@ -68,7 +68,7 @@ ConstantMemoryLink constantMemorySpheresLink() float brightness = 0; float hue = 0; - // Sélectionne la sphere la plus proche, il peut ne pas y avoir de sphère. + // Sélectionne la sphère la plus proche, il peut ne pas y avoir de sphère trouvée. for (int i = 0; i < NB_SPHERES; ++i) { #if CURRENT_MEMORY_MODEL == MEMORY_MODEL_GLOBAL @@ -78,6 +78,7 @@ ConstantMemoryLink constantMemorySpheresLink() #elif CURRENT_MEMORY_MODEL == MEMORY_MODEL_SHARED const Sphere& sphere = tabSpheresSM[i]; #endif + const float hSquare = sphere.hSquare(pixel); if (sphere.isBelow(hSquare)) @@ -94,7 +95,7 @@ ConstantMemoryLink constantMemorySpheresLink() } } - // Si une sphere a pu être trouvée. + // Si une sphère a pu être trouvée. if (selectedSphereDistance != FLT_MAX) { ColorTools::HSB_TO_RVB(hue, 1, brightness, &ptrDevPixels[s]);