Cleanup code
This commit is contained in:
@@ -82,7 +82,7 @@ int main()
|
||||
|
||||
for (auto&& [offset, dims] : boxes)
|
||||
{
|
||||
taskScheduler.AddTask([&, offset, dims]
|
||||
taskScheduler.AddTask([&, offset = offset, dims = dims]
|
||||
{
|
||||
thread_local std::size_t threadId = ++threadCounter;
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ Nz::Color RayColor(const SceneData& sceneData, const Nz::Rayd& r)
|
||||
else
|
||||
{
|
||||
Nz::Vector3d unitDirection = Nz::Vector3d::Normalize(r.direction);
|
||||
double a = 0.5 * (unitDirection.y + 1.0);
|
||||
return (1.0 - a) * Nz::Color(1.0, 1.0, 1.0) + a * Nz::Color(0.5, 0.7, 1.0);
|
||||
float a = static_cast<float>(0.5 * (unitDirection.y + 1.0));
|
||||
return (1.f - a) * Nz::Color(1.0, 1.0, 1.0) + a * Nz::Color(0.5, 0.7, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user