-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HdSt,HgiMetal] Metal tessellation for basisCurves and meshes
Implemented Storm support for the remaining refined drawing modes for basisCurves and mesh geometry for HgiMetal. Two significant differences with Metal tessellation are: 1) need to pre-compute a buffer of tessellation factors. 2) different attribute data access from PTVS vs VS/TCS. For 1) we introduce a PostTessellationControl (PTCS) shader which is a Metal PostTessellationVertex shader (PTVS) executed with rasterization disabled to compute and store values into a buffer of tessellation factors. For 2) we're able to handle most data access differences within Storm codeGen's accessor methods or within helper methods in the shader source. - Added HgiBindResourceTypeTessFactors to designate a buffer binding for the tessFactors buffer. - Updated HdSt_PipelineDrawBatch to allocate a tessFactors buffer and execute PTCS shaders. - Updated HgiMetal to bind the tessFactors buffer and execute PTCS shaders. - Updated Storm codeGen to support accessing varying data buffers indexed using values from the primitive index buffer. - Updated Storm basisCurves shader source and shaderKey to support both VS/TCS/TES and PTCS/PTVS pipelines with most shader source code shared in common between the two different kinds of pipelines. - Updated Storm mesh shader source and shaderKey to support PTCS/PTVS tessellation using OpenSubdiv surface evaluation. Contribution: Thor Hjalmarsson, David G Yu Fixes #2027 (Internal change: 2269604)
- Loading branch information
Showing
23 changed files
with
1,545 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.