/
Tessellation PerformanceJon Story, AMDCem Cebenoyan, NVIDIA Tessellation PerformanceJon Story, AMDCem Cebenoyan, NVIDIA

Tessellation PerformanceJon Story, AMDCem Cebenoyan, NVIDIA - PDF document

pamella-moone
pamella-moone . @pamella-moone
Follow
392 views
Uploaded On 2015-11-14

Tessellation PerformanceJon Story, AMDCem Cebenoyan, NVIDIA - PPT Presentation

Legend AMD specific NVIDIA specific Why TessellateEnables substantial geometric fidelityGPU side expansion very efficientScale performance and qualityProgrammatic LOD controlCompute at lower adaptiv ID: 192651

Legend AMD specific NVIDIA specific Why Tessellate?Enables substantial

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Tessellation PerformanceJon Story, AMDCe..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Tessellation PerformanceJon Story, AMDCem Cebenoyan, NVIDIA Legend AMD specific NVIDIA specific Why Tessellate?Enables substantial geometric fidelityGPU side expansion very efficientScale performance and qualityProgrammatic LOD controlCompute at lower, adaptively chosen, frequency Geometric Realism With Tessellation Generating Geometry OnChipCoarse data read through IA Compact representation Hull shadercontrols expansion Domain shader evaluates surface Hull Shader Tessellator Domain Shader Vertex Shader Geometry Shader Pixel Shader Geometry Data FlowRead coarse model data in VSTake advantage of this!Optimize models for posttransform cacheDo transformations and animation Prepare all other per vertex attributes VS Output DS Output Is Tessellation Free?No!If adding more geometry was free, we would have been doing this along time ago...Tessellation should be used where it will benefit image quality the mostSo tessellate wisely... How Many Triangles? Tess FactorTriangles13377312111181132531533764~6000 Tessellation Factor ~ 1Mesh would look identical if rendered nontessellatedUsing 3 additional pipeline stages needlesslyTotal waste of GPU resourcesUse mesh bounding volume to calculate the average tessellation factor on the CPUIf ~1 render nontessellated Use Occlusion & CullingDon‘t render occluded meshes!Even more important for tessellated meshesConsider using occlusion queries or predicated renderingUse the HS to cull patches outside the view frustumSet tessellation factor to 0 ~30% speed up in one application Use Adaptive Tessellation Techniques AggressivelyConsider using a combination of these techniques in your HS:Distance AdaptiveOrientation AdaptiveDensity AdaptiveScreen Space AdaptiveSelect the combination that yields the biggest win in your appOvertessellation will impact both frontend and backend performance Distance Adaptive TessellationUse the HS to determine the edge tessellation factors based on distance from view pointIf using a CPU check on the bounding volume to switch tessellation off:HS should use the same falloff values to avoid tessellation popping Distance Adaptive Tessellation: OFFDistance Adaptive Tessellation: ON Orientation Adaptive TessellationCompute dot product of average edge normal with view vectorBack facing patches either:Use lower tessellation factorsGet culled altogetherSilhouette patches use higher factorsEdgeScale = 1.0f abs( dot( N, V ) );Perfect for PNTriangles~3x gain at tessellation factor 9 Orientation Adaptive Tessellation: OFF Orientation Adaptive Tessellation: ON Density Adaptive TessellationPrecompute tessellation factors from displacement mapsCalculate gradients from height valuesCreate a buffer of patch edge tessellation factors Sample buffer in your HS to determine tessellation factor Density Adaptive Tessellation: OFFDensity Adaptive Tessellation: ON Screen Space Adaptive TessellationTriangles under 8 pixels are not efficientConsider limiting the global maximum TessFactor by screen resolutionConsider the screen space patch edge length as a scaling factorWatch out for patches at a skew angle to the cameraMay need to tweak how this works Draw Tessellated Meshes TogetherBad DrawDraw_TessellatedDrawDraw_TessellatedGood DrawDrawDraw_TessellatedDraw_TessellatedToggling tessellation is a large state changeMinimize these transitions Consider Using Stream OutIf you render tessellated meshes multiple times consider streaming out the tessellated meshShadow map slicesLighting passesThen render multiple times through the nontessellated pipeline Make sure you measure, this may not help performance! General RulesCompute complex things as early in the pipeline as possibleVS possible?HS possible?DS possible?If not, then PSTry to minimize number of attributes coming to PS stage Hull Shader Tips : 1A long HS can affect performance at low tessellation factorsKeep simpleMove work to the VS if possibleMinimize vertex data passed from the VSMinimize data passed to the DSSpecify maxtessfactor() with HSMay help the driver to optimize the workload Hull Shader Tips : 2Use a PASSTHROUGH Control Point PhaseOnly requires 1 HW thread Shading in the Domain ShaderCan hoist lowerfrequency computation from PS to DSE.g. ambient/volumetric lightingTest to see if this is a performance win it may well not be!This often works best with uniform sampling of surfaceTessellation with uniform screen space triangle sizes Aim for rasterizer“sweet spot” Shading in the Domain ShaderExample: underwater caustics Shading in the Domain ShaderExample: Fourier Opacity Maps Domain Shader TipsA long DS can dominate performance at high tessellation factorsKeep simpleCalculate mip level for sampling displacement mapsAvoid thrashing the texture cacheMinimize data passed to GS / PS SummaryTessellation can be a big quality and performance winUse occlusion & cullingDisable tessellation if not neededAggressively use adaptive tessellation techniquesKeep HS and DS stages as simple as possibleUse this killer DX11 feature to make games look awesome... Questions? jon.story@amd.com cem@nvidia.com