If you want to increase the tessellation factor anyway take a look at these shader files
\Unreal Engine\4.x\Engine\Shaders\Tessellation.usf
\Unreal Engine\4.x\Engine\Shaders\PNTriangles.usf
and search for the 'MaxTessFactor' variable.
//@todo: This should be vectorized and done in the MainHull shader. float4 CompositeTessellationFactors = TessellationMultipliers * CalculateCompositeTessellationFactors(WorldPostion0,WorldPostion1,WorldPostion2); // Limit the tessellation factor to <= 8. The multiplies and saturates handle any potential NANs/INFs in CompositeTessellationFactors. float4 MaxTessFactor = 8.0f; float4 InvMaxTessFactor = 1.0f / MaxTessFactor;
// clamp at 1 to prevent triangle to disappear with
CompositeTessellationFactors = max(1, MaxTessFactor * saturate(CompositeTessellationFactors * InvMaxTessFactor));
Changing this value will cause a full (material) shader recompilation so it'll take some time when you open the editor the first time.
No comments:
Post a Comment