Direct 3 D 11 Tutorial Tessellation Bill Bilodeau
Direct 3 D 11 Tutorial: Tessellation Bill Bilodeau ISV Relations Group AMD bill. bilodeau@amd. com V 1. 0
Topics Covered in This Session § Overview of Direct 3 D tessellation § Design of Hull and Domain Shaders –Two simple examples § How to write efficient tessellation code –An advanced example 2 Direct 3 D Tutorial: Tessellation 2/24/2021
There are many really good reasons for using tessellation § Compact representation § Real-time, continuous level of detail § Better looking silhouettes § Direct rendering of high-order surfaces created by modeling software § Faster – Animations can be done on the lower resolution mesh 3 Direct 3 D Tutorial: Tessellation 2/24/2021
. . and one really bad reason for using it. § Tessellating unnecessarily! –Triangles not seen –Triangles too small 4 Direct 3 D Tutorial: Tessellation 2/24/2021
Direct 3 D 11 Tessellator Stages 5 Direct 3 D Tutorial: Tessellation 2/24/2021
Direct 3 D 11 Tessellator Stages Hull Shader § Control point phase – Runs once per control point § Patch constant phase – Runs once per input primitive – Returns tessellation factors 6 Direct 3 D Tutorial: Tessellation 2/24/2021
Direct 3 D 11 Tessellator Stages Tessellator Stage § Generates the new vertices § Higher tessellation factors mean more triangles generated. Level 1. 0 7 Direct 3 D Tutorial: Tessellation 2/24/2021 Level 1. 5 Level 3. 0
Direct 3 D 11 Tessellator Stages Domain Shader § Runs once per vertex for surface evaluation at each vertex § Vertex data passed in as parametric coordinates 8 Direct 3 D Tutorial: Tessellation 2/24/2021
A simple example of tessellation (part 1) HULL SHADER TESSELLATOR Tessellated Mesh Triangle Patch Mesh 9 Direct 3 D Tutorial: Tessellation 2/24/2021
A simple example of tessellation (part 2) DOMAIN SHADER Displaced Mesh Tessellated Mesh Displacement Map 10 Direct 3 D Tutorial: Tessellation 2/24/2021
A simple example of tessellation (part 3) PIXEL SHADER Displaced Mesh Final Image Diffuse Texture Normal Map 11 Direct 3 D Tutorial: Tessellation 2/24/2021
C++ Code (part 1) // set the shaders pd 3 d. Immediate. Context->VSSet. Shader( g_p. Tessellation. VS, NULL, pd 3 d. Immediate. Context->HSSet. Shader( g_p. Tessellation. HS, NULL, pd 3 d. Immediate. Context->DSSet. Shader( g_p. Tessellation. DS, NULL, pd 3 d. Immediate. Context->GSSet. Shader( NULL, 0 ); Pd 3 d. Immediate. Context->PSSet. Shader( g_p. Simple. PS, NULL, 0 ); // set the vertex buffer UINT stride = sizeof(Vertex); UINT offset = 0; pd 3 d. Immediate. Context->IASet. Vertex. Buffers( 0, 1, &g_p. Mesh. VB, &offset ); 0 ); 0); &stride, // set input layout pd 3 d. Immediate. Context->IASet. Input. Layout( g_p. Vertex. Layout ); // set the primitive topology pd 3 d. Immediate. Context->IASet. Primitive. Topology( D 3 D 11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST); // Draw the model pd 3 d. Immediate. Context->Draw( g_Scene. Model. tri. Count * 3, 0 ); 12 Direct 3 D Tutorial: Tessellation 2/24/2021
Simple Hull Shader (control point phase) [domain("tri")] [partitioning("fractional_odd")] [outputtopology("triangle_cw")] [outputcontrolpoints(3)] [patchconstantfunc("Constants. HS")] [maxtessfactor(7. 0)] HS_CONTROL_POINT_OUTPUT HS( Input. Patch<VS_OUTPUT_HS_INPUT, 3> input. Patch, uint u. CPID : SV_Output. Control. Point. ID ) { HS_CONTROL_POINT_OUTPUT Out; // Copy inputs to outputs Out. v. World. Pos = input. Patch[u. CPID]. v. Pos. WS. xyz; Out. v. Tex. Coord = input. Patch[u. CPID]. v. Tex. Coord; Out. v. Normal = input. Patch[u. CPID]. v. Normal; Out. v. Light. TS = input. Patch[u. CPID]. v. Light. TS; return Out; } 13 Direct 3 D Tutorial: Tessellation 2/24/2021
Simple Hull Shader (patch constant phase) HS_CONSTANT_DATA_OUTPUT Constants. HS( Input. Patch<VS_OUTPUT_HS_INPUT, 3> p, uint Patch. ID : SV_Primitive. ID ) { HS_CONSTANT_DATA_OUTPUT Out; // Assign tessellation factors Out. Edges[0] = g_Tessellation. Factor; Out. Edges[1] = g_Tessellation. Factor; Out. Edges[2] = g_Tessellation. Factor; Out. Inside = g_Tessellation. Factor; return Out; } 14 Direct 3 D Tutorial: Tessellation 2/24/2021
Simple Domain Shader (part 1) [domain("tri")] DS_VS_OUTPUT_PS_INPUT DS( HS_CONSTANT_DATA_OUTPUT input, float 3 Barycentric. Coordinates : SV_Domain. Location, const Output. Patch<HS_CONTROL_POINT_OUTPUT, 3> Triangle. Patch ) { DS_VS_OUTPUT_PS_INPUT Out; // Interpolate world space position with barycentric coordinates float 3 v. World. Pos = Barycentric. Coordinates. x * Triangle. Patch[0]. v. World. Pos + Barycentric. Coordinates. y * Triangle. Patch[1]. v. World. Pos + Barycentric. Coordinates. z * Triangle. Patch[2]. v. World. Pos; // Interpolate texture coordinates with barycentric coordinates Out. v. Tex. Coord = Barycentric. Coordinates. x * Triangle. Patch[0]. v. Tex. Coord +. . . // Interpolate normal with barycentric coordinates float 3 v. Normal = Barycentric. Coordinates. x * Triangle. Patch[0]. v. Normal +. . . // Interpolate light vector with barycentric coordinates Out. v. Light. TS = Barycentric. Coordinates. x * Triangle. Patch[0]. v. Light. TS +. . . 15 Direct 3 D Tutorial: Tessellation 2/24/2021
Simple Domain Shader (part 2) // sample the displacement map for the magnitude of displacement float f. Displacement = g_Displacement. Map. Sample. Level( g_sample. Linear, Out. v. Tex. Coord. xy, 0 ). r; f. Displacement *= g_Scale; f. Displacement += g_Bias; float 3 v. Direction = -v. Normal; // direction is opposite normal // translate the position v. World. Pos += v. Direction * f. Displacement; // transform to clip space Out. v. Pos. CS = mul( float 4( v. World. Pos. xyz, 1. 0 ), g_m. World. View. Projection ); return Out; } // end of domain shader 16 Direct 3 D Tutorial: Tessellation 2/24/2021
Simple Pixel Shader float 4 PS( DS_VS_OUTPUT_PS_INPUT i ) : SV_TARGET { float 3 v. Light; float 3 v. Normal; // Get the normal v. Normal = normalize( (g_Normal. Map. Sample( g_sample. Linear, i. v. Tex. Coord ). rgb) * 2 - 1 ); v. Light = normalize(i. v. Light. TS); // get base color float 4 v. Base. Color = float 4(g_Base. Map. Sample( g_sample. Linear, i. v. Tex. Coord). rgb, 1. 0); // light the pixel float diffuse = saturate( dot( v. Normal, v. Light ) ); float 4 color = (v. Base. Color * diffuse) + (v. Base. Color * g_v. Ambient. Color); return color; } 17 Direct 3 D Tutorial: Tessellation 2/24/2021
Demo: Simple Tessellation 18 Direct 3 D Tutorial: Tessellation 2/24/2021
Some things to remember about this example § Simple but powerful – A few hours of coding but can be used for something as useful as terrain rendering § Minimal work in the Hull Shader – Driver recognizes the “Pass Through” shader and optimizes for it § Normal Map Lighting – Lighting a displaced surface can be difficult because the normals change! – Normal map lighting avoids this since normal map is paired with the displacement map: 19 Direct 3 D Tutorial: Tessellation 2/24/2021
Parametric Surfaces § Hardware tessellation can be used to render 3 D parametric surfaces directly § Cubic Bezier surfaces are easy to render – Can convert many types of surfaces to Bezier patches in the Hull Shader § Domain Shader evaluates the surface at the vertex 20 Direct 3 D Tutorial: Tessellation 2/24/2021
Bicubic Bezier Patch Example HULL SHADER TESSELLATOR DOMAIN SHADER Bezier Control Points 3 3 Pos(u, v) = S S Bm(u) Bn(v) G m=0 n=0 Where: B 0 = (1 -t)3 B 1 = 3 t(1 -t)2 B 2 = 3 t 2(1 -t) B 3 = t 3 P 00 P 01 and G = P 10 P 11 P 20 P 21 P 30 P 31 21 Direct 3 D Tutorial: Tessellation 2/24/2021 P 02 P 12 P 22 P 32 P 03 P 13 P 23 P 33 Tessellated Bezier Patch
Bezier Patch C++ Code // Layout for control points const D 3 D 11_INPUT_ELEMENT_DESC patchlayout[] = { {"POSITION", 0, DXGI_FORMAT_R 32 G 32 B 32_FLOAT, 0, 0, D 3 D 11_INPUT_PER_VERTEX_DATA, 0 }, }; //. . . // Control points are stored in the vertex buffer pd 3 d. Immediate. Context->IASet. Vertex. Buffers(0, 1, &g_p. Control. Point. VB, &Stride, &Offset ); // Primitive Topology pd 3 d. Immediate. Context->IASet. Primitive. Topology( D 3 D 11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST ); // Draw the mesh pd 3 d. Immediate. Context->Draw( g_vertex. Count, 0 ); 22 Direct 3 D Tutorial: Tessellation 2/24/2021
Bezier Patch Domain Shader (part 1) float 4 Bernstein. Basis(float t) { float inv. T = 1. 0 f - t; return float 4( inv. T * inv. T, 3. 0 f * t * inv. T, t * t ); // t 3 // (1 -t)3 // 3 t(1 -t)2 // 3 t 2(1 -t) } // Derivative of the basis functions float 4 d. Bernstein. Basis(float t) { float inv. T = 1. 0 f - t; return float 4( -3 * inv. T, // -3(1 -t)2 3 * inv. T - 6 * t * inv. T, 6 * t * inv. T - 3 * t, 3 * t ); // 3 t 2 } 23 Direct 3 D Tutorial: Tessellation 2/24/2021 // 3(1 -t)-6 t(1 -t) // 6 t(1 -t) – 3 t 2
Bezier Patch Domain Shader (part 2) float 3 Evaluate. Bezier( const Output. Patch<HS_OUTPUT, OUTPUT_PATCH_SIZE> bezpatch, float 4 Basis. U, float 4 Basis. V ) { // Value(u, v) = S S Bm(u) Bn(v) G float 3 Value = float 3(0, 0, 0); Value = Basis. V. x * ( bezpatch[0]. v. Position * Basis. U. x + bezpatch[1]. v. Position * Basis. U. y + bezpatch[2]. v. Position * Basis. U. z + bezpatch[3]. v. Position * Basis. U. w ); Value += Basis. V. y * ( bezpatch[4]. v. Position * Basis. U. x + bezpatch[5]. v. Position * Basis. U. y + bezpatch[6]. v. Position * Basis. U. z + bezpatch[7]. v. Position * Basis. U. w ); Value += Basis. V. z * ( bezpatch[8]. v. Position * Basis. U. x + bezpatch[9]. v. Position * Basis. U. y + bezpatch[10]. v. Position * Basis. U. z + bezpatch[11]. v. Position * Basis. U. w ); Value += Basis. V. w * ( bezpatch[12]. v. Position * Basis. U. x + bezpatch[13]. v. Position * Basis. U. y + bezpatch[14]. v. Position * Basis. U. z + bezpatch[15]. v. Position * Basis. U. w ); return Value; } 24 Direct 3 D Tutorial: Tessellation 2/24/2021
Bezier Patch Domain Shader (part 3) [domain("quad")] DS_OUTPUT Bezier. DS( HS_CONSTANT_DATA_OUTPUT input, float 2 UV : SV_Domain. Location, const Output. Patch<HS_OUTPUT, OUTPUT_PATCH_SIZE> bezpatch ) { // Evaluate the basis functions at (u, v) float 4 Basis. U = Bernstein. Basis( UV. x ); float 4 Basis. V = Bernstein. Basis( UV. y ); float 4 d. Basis. U = d. Bernstein. Basis( UV. x ); float 4 d. Basis. V = d. Bernstein. Basis( UV. y ); // Evaluate the surface position for this vertex float 3 World. Pos = Evaluate. Bezier( bezpatch, Basis. U, Basis. V ); // Evaluate the tangent space for this vertex float 3 Tangent = Evaluate. Bezier( bezpatch, d. Basis. U, Basis. V ); float 3 Bi. Tangent = Evaluate. Bezier( bezpatch, Basis. U, d. Basis. V ); float 3 Norm = normalize( cross( Tangent, Bi. Tangent ) ); DS_OUTPUT Output; Output. v. Position = mul( float 4(World. Pos, 1), g_m. View. Projection ); Output. v. World. Pos = World. Pos; Output. v. Normal = Norm; return Output; } 25 Direct 3 D Tutorial: Tessellation 2/24/2021
Bezier Patch Demo 26 Direct 3 D Tutorial: Tessellation 2/24/2021
Advanced Tessellation Example: Decal Tessellation § Apply a displacement decal to any mesh, then draw with tessellation to accurately render the displacement § Tessellates arbitrary scene meshes without modifications to the art pipeline § Use the hull shader to control tessellation levels and improve performance 27 Direct 3 D Tutorial: Tessellation 2/24/2021
Ray cast to find the hit location Constant Buffer Normal Binormal Tangent Position N 0 B 0 T 0 P 0 N 1 B 1 T 1 P 1 N 2 B 2 T 2 P 2 28 Direct 3 D Tutorial: Tessellation 2/24/2021
Compute the displacement map coordinates in the Domain Shader 29 Direct 3 D Tutorial: Tessellation 2/24/2021
Decal Tessellation Domain Shader (part 1) // See if this vertex is affected by any of the decals for (int i = 0; i < MAX_DECALS; i++) { // get the hit location float 3 v. Hit. Location = g_Hit. Location[i]; // find the distance from the current vertex to the hit location float distance. To. Hit = distance(v. World. Pos, v. Hit. Location. xyz); // check if the vertex is within the decal radius if (distance. To. Hit <= decal. Radius) { // translate the position to a coordinate space // with the hit location as the origin float 3 v. World. Pos. Trans = v. World. Pos - v. Hit. Location. xyz; // create the decal tangent space matrix float 3 x 3 m. World. To. Tangent = float 3 x 3( g_v. Tangent[i]. xyz, g_v. Binormal[i]. xyz, g_v. Normal[i]. xyz ); 30 Direct 3 D Tutorial: Tessellation 2/24/2021
Decal Tessellation Domain Shader (part 2) // Transform the position into decal tangent space to // get the displacement map texture coordinate. float 3 v. World. Pos. Trans = v. World. Pos - v. Hit. Location. xyz; float 3 v. DMTex. Coord = mul( m. World. To. Tangent, v. World. Pos. Trans); // normalize coordinate to values between 0 and 1 v. DMTex. Coord /= decal. Radius* 2; v. DMTex. Coord += 0. 5; // project displacement map coordinate onto the x, y plane v. DMTex. Coord. z = 1; // z = 0 tells pixel shader this is invalid // sample the displacement map float f. Displacement = g_Displacement. Map. Sample. Level( g_sample. Linear, v. DMTex. Coord. xy, 0 ). r; f. Displacement *= g_Scale; f. Displacement += g_Bias; // hit direction is opposite of tangent space normal float 3 v. Direction = -g_v. Normal[i]. xyz; 31 Direct 3 D Tutorial: Tessellation 2/24/2021
Decal Tessellation Domain Shader (part 3) // Displace the vertex v. World. Pos += v. Direction * f. Displacement; // Create the light vector float 3 v. Light. WS = g_v. Light. Position. xyz - v. World. Pos; // transform the light vector into tangent space Out. v. Light. TS = mul( m. World. To. Tangent, v. Light. WS ); // Use the displacement map coord for the normal map coord Out. v. NMTex. Coord = v. DMTex. Coord; break; } // end of “if (distance. To. Hit <= decal. Radius)” } // end of “for (int i = 0; i < MAX_DECALS; i++)” Out. v. Pos. CS = mul( float 4( v. World. Pos. xyz, 1. 0 ), g_m. World. View. Projection ); return Out; } // end of domain shader 32 Direct 3 D Tutorial: Tessellation 2/24/2021
Decal Tessellation Pixel Shader // Get the Normal and Light vectors for lighting // If v. NMTex. Coord. z = 1, then this pixel is part of the decal if (i. v. NMTex. Coord. z < 1) { // Not part of the decal, just use the interpolated normal. v. Normal = normalize(i. v. Normal); v. Light = normalize(i. v. Light. WS); } else { // Part of the decal, get the normal from the decal normal map. v. Normal = normalize( (g_Normal. Map. Sample( g_sample. Linear, i. v. NMTex. Coord ). rgb) * 2 - 1 ); v. Light = normalize(i. v. Light. TS); }. . . 33 Direct 3 D Tutorial: Tessellation 2/24/2021
Demo: Decal Tessellation 34 Direct 3 D Tutorial: Tessellation 2/24/2021
Making it faster § Analysis – Expensive Domain Shader – Small triangles are inefficient § Hardware wants triangles to be at least 8 pixels § Solution – Reduce the number of tessellated vertices § Fewer executions of the Domain Shader – Hull Shader can adjust the tessellation factors 35 Direct 3 D Tutorial: Tessellation 2/24/2021
Distance Adaptive Tessellation § Adjust the tessellation factors globally for the object based on distance § Simple LERP done outside of shader code: TF = (1 – t) max. TF + t where: t = distance / max. Tessellation. Distance § Or, use Hull Shader to calculate screen space edge length § Use an impostor when far away (just normal map) 36 Direct 3 D Tutorial: Tessellation 2/24/2021
Distance Adaptive Tessellation Demo 37 Direct 3 D Tutorial: Tessellation 2/24/2021
Distance Adaptive Results § Two orders of magnitude improvement for when object is far away! § Doesn’t help much for objects close up § Very little code changes 38 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive § Use the displacement map to determine how much to tessellate § High frequency of displacements (jagged) require more tessellation § Low Frequency of displacements (smooth) require fewer tessellation 39 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive with Decal Tessellation 2 Decal an st = C di Decal di 2 ce s po tan in ce tt f o ro pl m an e 2 C -B Decal B 40 Direct 3 D Tutorial: Tessellation Patch Triangle 2/24/2021
Displacement Adaptive Hull Shader Pseudo Code for (each decal in the list) { if ( either vertex of Edge 0 is within the decal’s radius) { tessellate this edge; } else { if ( (distance from the decal to Edge 0 is within the radius) && (decal interscects the line segment) ) { tessellate this edge; } } Do the same for Edge 1 and Edge 2 … } if ( any edge is tessellated ) || ( ( distance from decal to triangle plane is within radius) && ( decal projected onto triangle plane is within triangle) ) { tessellate the inside } 41 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive Hull Shader (part 1) // default tessellation factors Out. Edges[0] = Out. Edges[1] = Out. Edges[2] = Out. Inside = 1; // Iterate over all decals to see if tessellation is needed for (int i = 0; i < MAX_DECALS; i++) { edge. Tessellated = false; float 3 v. Decal. Location = g_Decal. Location[i]; // Edge 0 v. Decal. To. Pos 0 = v. Decal. Location - v. Pos 0; mag. Squared 0 = dot( v. Decal. To. Pos 0 , v. Decal. To. Pos 0 ); v. Decal. To. Pos 1 = v. Decal. Location - v. Pos 1; mag. Squared 1 = dot( v. Decal. To. Pos 1, v. Decal. To. Pos 1 ); // See if the distance to either vertex < decal radius if ((mag. Squared 0 <= decal. Radius. Squared) || (mag. Squared 1 <= decal. Radius. Squared)) { Out. Edges[0] = g_Tessellation. Factor; edge. Tessellated = true; } 42 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive Hull Shader (part 2) else { // project line onto triangle patch edge v. Edge 0 = v. Pos 1 – v. Pos 0; mag. Squared. Edge 0 = dot(v. Edge 0, v. Edge 0); v. Projected = (dot(v. Decal. Pos 0, v. Edge 0)/mag. Squared. Edge 0) * v. Edge 0; mag. Squared. Proj = dot(v. Projected, v. Projected); // Use the Pythagorean theorem to find the squared distance. Squared = mag. Squared 0 - mag. Squared. Proj; if ((distance. Squared <= decal. Radius. Squared) && // within radius (dot(v. Projected, v. Edge 0) >= 0) && // within edge line segment (mag. Squared. Proj <= mag. Squared. Edge 0)) { Out. Edges[0] = g_tessellation. Factor; edge. Tessellated = true; } } // Do the same thing for Edge 1 and Edge 2. . . 43 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive Hull Shader (part 3) // Inside float 3 v. Plane. Normal = normalize( cross(v. Edge 0, -v. Edge 2) ); // Use the dot product to find distance between point and plane float distance. To. Plane = abs (dot(v. Plane. Normal, v. Decal. To. Pos 0)); if (distance. To. Plane <= decal. Radius) { // Point in triangle test using barycentric coordinates float dot. AA = dot(v. Edge. A, v. Edge. A); float dot. AB = dot(v. Edge. A, v. Edge. B); float dot. BB = dot(v. Edge. B, v. Edge. B); float inv. Denom = 1. 0 / (dot. AA * dot. BB - dot. AB * dot. AB); float dot. AHit = dot(v. Edge. A, v. Hit. Edge 0); float dot. BHit = dot(v. Edge. B, v. Hit. Edge 0); float u = (dot. BB * dot. AHit - dot. AB * dot. BHit) * inv. Denom; float v = (dot. AA * dot. BHit - dot. AB * dot. AHit) * inv. Denom; if ( ((u > 0) && (v > 0) && ((u + v) < 1)) || edge. Tessellated ) { Out. Inside = tessellation. Factor; } } } // end of for loop 44 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive Tessellation Demo 45 Direct 3 D Tutorial: Tessellation 2/24/2021
Displacement Adaptive Results § Two orders of magnitude improvement in performance when object is close to camera! § Combined with Distance Adaptive, almost as fast as without tessellation when viewed from far away. § But wait there’s more … 46 Direct 3 D Tutorial: Tessellation 2/24/2021
Back-Face Culling § Why tessellate (or even draw) triangles facing away from the camera that you can’t see? § Do back-face culling in the Hull Shader § Patches are not drawn if all of the tessellation factors are set to zero. 47 Direct 3 D Tutorial: Tessellation 2/24/2021
Back-Face Culling in the Hull Shader // find two triangle patch edges float 3 v. Edge 0 = v. Pos 1 - v. Pos 0; float 3 v. Edge 2 = v. Pos 2 - v. Pos 0; float 3 v. Face. Normal = normalize( cross(v. Edge 2, v. Edge 0) ); float 3 v. View = normalize( v. Pos 0 - g_v. Eye. Position ); // A negative dot product means facing away from view direction if ( dot(v. View, v. Face. Normal) < -0. 25 ) { // Cull the triangle by setting the tessellation factors to 0. Out. Edges[0] = 0; Out. Edges[1] = 0; Out. Edges[2] = 0; Out. Inside = 0; return Out; // early exit } 48 Direct 3 D Tutorial: Tessellation 2/24/2021
Back-Face Culling Demo 49 Direct 3 D Tutorial: Tessellation 2/24/2021
Back-Face Culling Results § About 40% improvement when one decal is culled. § Easy to implement – only a few lines of code § Make cull test with a small epsilon to avoid popping 50 Direct 3 D Tutorial: Tessellation 2/24/2021
Other Optimizations to Consider § Frustum Culling § Group tessellated draw call together § Orientation Adaptive Tessellation – Use dot(V, N) to find silhouette patches § Hull Shader – Try to reduce data passed in and out § Domain Shader – Try to move work to Pixel Shader – Reduce data passed out § Geometry Shader – Use Stream Out to avoid re-tessellating an object 51 Direct 3 D Tutorial: Tessellation 2/24/2021
Questions ? bill. bilodeau@amd. com Trademark Attribution AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdictions. Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners. © 2010 Advanced Micro Devices, Inc. All rights reserved. 52 Direct 3 D Tutorial: Tessellation 2/24/2021
- Slides: 52