|
|
|
|
|
|
// For tessellation we want to process tessellation factor always from the point of view of the camera (to be consistent and avoid Z-fight). |
|
|
|
// For the culling part however we want to use the current view (shadow view). |
|
|
|
// Thus the following code play with both. |
|
|
|
|
|
|
|
|
|
|
|
// TODO: the only reason I test the near plane here is that I am not sure that the product of other tessellation factors |
|
|
|
// (such as screen-space/distance-based) results in the tessellation factor of 1 for the geometry behind the near plane. |
|
|
|
// If that is the case (and, IMHO, it should be), we shouldn't have to test the near plane here. |
|
|
|
bool3 frustumCullEdgesMainView = CullTriangleEdgesFrustum(p0, p1, p2, frustumEps, _FrustumPlanes, 5); // Do not test the far plane |
|
|
|
|
|
|
|
#if defined(SHADERPASS) && (SHADERPASS != SHADERPASS_SHADOWS) |
|
|
|