1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-09-19 14:49:54 +00:00

Code review feedback

This commit is contained in:
Chuck Walbourn 2018-04-27 14:24:50 -07:00
parent 84831beb5a
commit 68fc189445
3 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);