Skip to content

Commit

Permalink
arruma cached
Browse files Browse the repository at this point in the history
  • Loading branch information
vitor-k committed Nov 14, 2019
1 parent 82cdbd8 commit ecca3f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RayTracer/RayTracer/GravitationalEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ bool GravitationalEntity::response(v3d& rayDirection, v3d& intersection, v3d& in
if (useCache) {
if (cachedResults.count({ std::round(granularityMultiplier * intersection.x), std::round(granularityMultiplier * intersection.y), std::round(granularityMultiplier * intersection.z) }) > 0) {
State3d final = cachedResults[{std::round(granularityMultiplier* intersection.x), std::round(granularityMultiplier* intersection.y), std::round(granularityMultiplier* intersection.z) }];
intersection = final.s;
intersection = final.s * schwarzschildRadius + center;
rayDirection = final.v;
return false;
}
Expand Down

0 comments on commit ecca3f8

Please sign in to comment.