for(int i = 0; i < numCascades; i++)
{
if(viewPos.z < splitEnd[i])
{
//transform using *i* split proj matrix
break;
}
}
However I'm looking for faster methods to do the selection because loops/conditionals are usually slow inside pixel shaders.
Can someone explain a faster method? Thanks.
P.S. I calculate each split projection matrix by creating a tight sphere around the world space corners of the view frustum split.
Edited by TiagoCosta, 01 September 2012 - 10:55 AM.






