From 68fc1894455fdb3a309b74bcb2f2dc1ab4f4d689 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 27 Apr 2018 14:24:50 -0700 Subject: [PATCH] Code review feedback --- Inc/DirectXCollision.h | 8 ++++---- SHMath/DirectXSHD3D11.cpp | 6 +++--- SHMath/DirectXSHD3D12.cpp | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Inc/DirectXCollision.h b/Inc/DirectXCollision.h index c097298..dcd2ec3 100644 --- a/Inc/DirectXCollision.h +++ b/Inc/DirectXCollision.h @@ -241,10 +241,10 @@ struct BoundingFrustum XMFLOAT3 Origin; // Origin of the frustum (and projection). XMFLOAT4 Orientation; // Quaternion representing rotation. - float RightSlope; // Positive X slope (X/Z). - float LeftSlope; // Negative X slope. - float TopSlope; // Positive Y slope (Y/Z). - float BottomSlope; // Negative Y slope. + float RightSlope; // Positive X (X/Z) + float LeftSlope; // Negative X + float TopSlope; // Positive Y (Y/Z) + float BottomSlope; // Negative Y float Near, Far; // Z of the near plane and far plane. // Creators diff --git a/SHMath/DirectXSHD3D11.cpp b/SHMath/DirectXSHD3D11.cpp index 2fa1ed0..f6bd5f6 100644 --- a/SHMath/DirectXSHD3D11.cpp +++ b/SHMath/DirectXSHD3D11.cpp @@ -283,12 +283,12 @@ HRESULT DirectX::SHProjectCubeMap( return E_FAIL; } - const float fV = y * fS + fB; + const float v = y * fS + fB; XMVECTOR* pixel = ptr; for (UINT x = 0; x < desc.Width; ++x, ++pixel) { - const float fU = x * fS + fB; + const float u = x * fS + fB; float ix, iy, iz; switch (face) @@ -338,7 +338,7 @@ HRESULT DirectX::SHProjectCubeMap( XMVECTOR dir = XMVectorSet(ix, iy, iz, 0); dir = XMVector3Normalize(dir); - const float fDiffSolid = 4.0f / ((1.0f + fU * fU + fV * fV)*sqrtf(1.0f + fU * fU + fV * fV)); + const float fDiffSolid = 4.0f / ((1.0f + u * u + v * v)*sqrtf(1.0f + u * u + v * v)); fWt += fDiffSolid; XMSHEvalDirection(shBuff, order, dir); diff --git a/SHMath/DirectXSHD3D12.cpp b/SHMath/DirectXSHD3D12.cpp index a50166b..a515dd3 100644 --- a/SHMath/DirectXSHD3D12.cpp +++ b/SHMath/DirectXSHD3D12.cpp @@ -246,12 +246,12 @@ HRESULT DirectX::SHProjectCubeMap( return E_FAIL; } - const float fV = y * fS + fB; + const float v = y * fS + fB; XMVECTOR* pixel = ptr; for (UINT x = 0; x < desc.Width; ++x, ++pixel) { - const float fU = x * fS + fB; + const float u = x * fS + fB; float ix, iy, iz; switch (face) @@ -301,7 +301,7 @@ HRESULT DirectX::SHProjectCubeMap( XMVECTOR dir = XMVectorSet(ix, iy, iz, 0); dir = XMVector3Normalize(dir); - const float fDiffSolid = 4.0f / ((1.0f + fU * fU + fV * fV)*sqrtf(1.0f + fU * fU + fV * fV)); + const float fDiffSolid = 4.0f / ((1.0f + u * u + v * v)*sqrtf(1.0f + u * u + v * v)); fWt += fDiffSolid; XMSHEvalDirection(shBuff, order, dir);