|
|
|
|
|
|
if (_TessellationFactorTriangleSize > 0.0) |
|
|
|
{ |
|
|
|
// return a value between 0 and 1 |
|
|
|
edgeTessFactors *= GetScreenSpaceTessFactor( p0, p1, p2, UNITY_MATRIX_VP, _ScreenSize, _TessellationFactorTriangleSize); // Use primary camera view |
|
|
|
// Warning: '_ViewProjMatrix' is not the same as UNITY_MATRIX_VP for shadow views! |
|
|
|
edgeTessFactors *= GetScreenSpaceTessFactor( p0, p1, p2, _ViewProjMatrix, _ScreenSize, _TessellationFactorTriangleSize); // Use primary camera view |
|
|
|
} |
|
|
|
|
|
|
|
// Distance based tessellation |
|
|
|