I have this chunk of HLSL to select which view matrix to use when doing point light shadow maps. in old code I had this if-else structure:
if (xDot > yDot)
{
if (xDot > zDot)
{
axis = 0;
component = positionToLight.x;
}
else
{
axis = 2;
component = positionToLight.z;
}
}
Comment too long. Click here to view the full text.