Skip to content

Commit 53f81af

Browse files
author
kevyuu
committed
Reorder normal calculation so no need to normalize position
1 parent 7728987 commit 53f81af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nbl/asset/utils/CGeometryCreator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CGeometryCreator::createCylinder(
568568
{
569569
const auto f_i = static_cast<float>(i);
570570
hlsl::float32_t3 p(std::cos(f_i * step), std::sin(f_i * step), 0.f);
571+
const auto n = quantNormalCache->quantize<NormalCacheFormat>(p);
571572
p *= radius;
572-
const auto n = quantNormalCache->quantize<NormalCacheFormat>(hlsl::normalize(p));
573573

574574
positions[i] = { p.x, p.y, p.z };
575575
memcpy(normals + i, &n, sizeof(n));

0 commit comments

Comments
 (0)