Permalink
Browse files

C++ buffer oriented: unpacking from FP16 needs to normalize direction…

…, otherwise I get some bright red spot in one place :)

- PC 161 -> 156 Mray/s
- Mac 40.5 -> 39.5 Mray/s
  • Loading branch information...
aras-p committed Apr 19, 2018
1 parent ada1ff9 commit 8c84bbc6239768fe7b81d61a0beda05cff2952a5
Showing with 1 addition and 1 deletion.
  1. +1 −1 Cpp/Source/Test.cpp
View
@@ -81,7 +81,7 @@ struct RayData
Float3ToHalf3(atten, &attenX);
}
Ray GetRay() const { return Ray(float3(origX,origY,origZ), Half3ToFloat3(&dirX)); }
Ray GetRay() const { return Ray(float3(origX,origY,origZ), normalize(Half3ToFloat3(&dirX))); }
float3 GetAtten() const { return Half3ToFloat3(&attenX); }
float origX, origY, origZ;

0 comments on commit 8c84bbc

Please sign in to comment.