Commit Graph

1283 Commits

Author SHA1 Message Date
barry
5e1a4b44be Minor improvements to Doxygen comments for Far header files:
- minor changes to Doxygen comments based on feedback
    - new description for PatchTableFactory::Options::EndCapType
    - fixed warnings related to Doxygen use of <REAL> in patchTable.h
2019-06-20 13:56:54 -07:00
barry
6d3e1b02af Added condition to compensate for incorrect FVar corner tags:
- re-assess corner tags for irregular patches on FVar boundaries
2019-06-18 11:24:23 -07:00
barry
69ab4d6170 Fixed Loop patch creation bug with val-3 interior vertex at third corner:
- adjusted point-sharing logic in PatchBuilder::SourcePatch to correct
2019-06-14 11:28:22 -07:00
David G Yu
f881c49a5b Minor revisions to some Osd deprecation notes
Several of the methods in osd/patchBasisCommon.h were
never intended as public API, and several have been
deprecated in favor of the newer OsdEvaluatePatchBasis()
and OsdEvaluatePatchBasisNormalized() methods. These
obsolete methods have now all be marked as deprecated.

Also, fixed a minor spelling typo in glslPatchBasisCommon.glsl
2019-06-10 15:29:03 -07:00
David G Yu
943f1a8886
Merge pull request #1117 from barfowl/far_api_revisions
Minor revisions to a few precision related methods of Far classes
2019-06-07 20:56:57 -07:00
barry
b2d610fd56 Minor revisions to some precision related methods of Far classes:
- renamed PatchTable methods to query the precision of its StencilTables
    - removed the "set" prefix from precision-related PatchTableFactory::Options
2019-06-07 18:40:53 -07:00
barry
cb79eab120 Improved Loop regular patch approximations of irregular features:
- updated LoopPatchBuilder with new Gregory to Box-spline conversion matrix
2019-06-07 17:55:31 -07:00
David G Yu
67cc2a3810 Irregular patch shader transition edges
Updated the Gregory patch tessellation shaders to account for
transition edges.

Changed the implementation of OsdGetTessParameterizationTriangle()
to take the input parametric location as a 3-component value. This
allows the edge parameterization to be more numerically robust and
consistent.

Also, corrected some minor discrepancies between the various
tessellation shader configurations.
2019-06-03 15:34:40 -07:00
David G Yu
17bc75b488 Compute transition mask for irregular patches
The irregular patches around extraordinary vertices
might have transitions edges depending on the secondary
refinement level specified during topological refinement.

We used to skip the computation of the transition mask
for irregular patches, but this is now necessary
since the introduction of the secondary level option.
2019-05-30 12:12:53 -07:00
Pol
5fec55ede8
Merge pull request #1111 from davidgyu/loop_patches_mtl_drawing
Drawing Loop patches with Metal tessellation shaders
2019-05-30 10:28:16 -07:00
David G Yu
2e175ff52b Mtl implementation mtlViewer organization
Refactored computation and drawing code used
for tessellated patches to improve readability
and extensibility.

- Updated mtlViewer.metal computation kernel to express
  data indexing using familiar semantic concepts: i.e.
  primitiveID, vertexID, etc. instead of threadgroup
  semantics.
- Updated mtlViewer.mm to consolidate patch type
  dispatch. Now, the configuration and execution
  of the compute and drawing passes is controlled
  by a PipelineConfig descriptor.
2019-05-30 10:00:55 -07:00
David G Yu
232d50c231 Mtl implementation cleanup thread dispatch
Moved some of the boiler-plate code related to
thread group dispatching and configuration from
the osd shader source to the example shader source.
2019-05-30 00:47:50 -07:00
David G Yu
cc6c9da070 Mtl implementation drawing triangle patches
Updated Metal shaders to add support for drawing triangle
patches. This matches the current GLSL implementation.

- BoxSplineTriangle and GregoryTriangle patch shaders
- tess factor and tess evalutation for triangle patches
- improved adaptive tessellation code organization and function names
- quartic Bezier triangle patch evaluation
- OsdGetPatchIsTriangleRotated() function added
- OsdInterpolatePatchCoordTriangle() function added
2019-05-30 00:47:50 -07:00
David G Yu
ebf2917dc7 Mtl implementation fixed example fvar interp
Refactored the Metal viewer's implementation of
smooth face-varying uv interpolation so that the
face-varying patch basis is correctly determined
by inspecting the face-varying patch array type
descriptors.
2019-05-30 00:47:45 -07:00
David G Yu
510ff8e85e
Merge pull request #1110 from barfowl/vtr_semi_sharp_fvar
Fixed semi-sharp face-varying boundaries when creating inf-sharp patches
2019-05-28 15:26:27 -07:00
David G Yu
8912b3f3d3 Mtl implementation screenspace fvar interp
Fixed smooth face-varying interpolation for the Metal viewer
when using screen-space tessellation. The location to evaluate
the face-varying value needs to match the computed tess location
instead of the intrinsic position_in_patch.
2019-05-28 10:02:08 -07:00
David G Yu
11bcf82632 Mtl implementation common tess shader source
Moved Metal shader code which computes tessellation factors and
tessellation parameterization into a separate source file.
2019-05-28 10:02:04 -07:00
David G Yu
9cc0cb2c01 Mtl implementation fixed typo in shader source
Fixed a misspelling in a macro: BOUNDRY -> BOUNDARY which was
preventing the Metal legacy gregory shader source from being
compiled correctly.
2019-05-24 12:39:20 -07:00
David G Yu
770c8a45e2 Mtl implementation legacy gregory shader
This migrates a fix from the legacy GLSL shader code
to improve consistency between the implementions.
2019-05-24 12:36:52 -07:00
David G Yu
1ae203ed20 Mtl implementation legacy shader code
Moved Metal shader code used for evaluation of legacy gregory patches
to a separate source file.

These methods should not be used for new development, but are provided
for backward compatibility.
2019-05-22 18:40:58 -07:00
David G Yu
291eff0bed Mtl implementation whitespace fixes
Fixed numerous whitespace inconsistencies and violations
in the core osd metal implementation and examples.
2019-05-22 18:00:36 -07:00
barry
f4a3ee1283 Fixed sharpening of semi-sharp features on face-varying boundaries:
- updated VTag initialization to tag inf-sharp crease for semi-sharp values
2019-05-22 17:05:43 -07:00
barry
a18a706f93 Fixed regression in application of smooth corner patch approximation:
- only apply the approximation at corners determined to be smooth
2019-05-21 19:53:21 -07:00
barry
5aa10c8f55 Fixed max-valence assignment in refinement to account for non-manifold edges:
- consider the vertex from the edge with the maximum number of faces
2019-05-16 14:42:23 -07:00
barry
17218ce6fe Fixed bug estimating Gregory face-point size for sharp corner patches 2019-05-14 11:08:52 -07:00
David G Yu
5d8016be9e
Merge pull request #1099 from barfowl/far_nonmanifold_fixes
Fixed bugs constructing patches with non-manifold features
2019-05-06 10:30:28 -07:00
barry
dd1949ef74 Fixed bugs in Far::PatchBuilder related to non-manifold topology:
- fixed interior/periodic assignment around non-manifold vertices
    - fixed assembly of regular triangular patches along non-manifold edges
    - removed unnecessary assert in assembly of regular quad patches
2019-05-02 15:23:02 -07:00
Pol
1844d620f4
Merge pull request #1098 from davidgyu/loop_patches_dx11_drawing
Drawing Loop patches with HLSL tessellation shaders
2019-04-26 16:54:26 -07:00
David G Yu
556d1dda79 Added HLSL support for drawing triangle patches
This matches the current GLSL implementation:

- BoxSplineTriangle and GregoryTriangle patch shaders
- tess factor and tess evalutation for triangle patches
- improved adaptive tessellation code organization and function names
- quartic Bezier triangle patch evaluation
- OsdGetPatchIsTriangleRotated() function added
- OsdInterpolatePatchCoordTriangle() function added
2019-04-26 11:07:56 -07:00
David G Yu
aa0def2b95 Moved HLSL tess factor code to separate file
Moved shader code which computes tessellation factors and
tessellation parameterization into a separate source file.
2019-04-26 10:58:02 -07:00
David G Yu
fda4ded404 Fixed HLSL legacy gregory shader valence limit
THis migrates a fix from the legacy GLSL shader code
to improve consistency between the implementions.
2019-04-26 10:58:02 -07:00
David G Yu
08997ef2b2 Moved HLSL legacy shader code to separate file
Moved shader code used for evaluation of legacy gregory patches.

These methods should not be used for new development, but are provided
for backward compatibility.
2019-04-26 10:57:56 -07:00
barry
184ae997d6 Fixed single-crease patch isolation now required without boundary isolation:
- added member to FeatureMask for single-crease option without inf-sharp
    - adjusted adaptive refinement to handle unisolated interior sharp edges
2019-04-24 14:56:49 -07:00
George ElKoura
c34cc0a7fe A few minor fixes for Gregory Patches in DirectX
- Make sure to initialize all structs properly when using gregory
patches

- Rename a loop variable to avoid shader compiler warning.
2019-04-01 00:22:11 -07:00
barry
1cdbb7246a Minor improvement to degenerate normals in GLSL Bezier triangle:
- negate derivative terms when evaluating points on edge where u + v = 1
2019-02-11 18:05:08 -08:00
barry
479a297bc6 Correction to recent changes to boundary weights of box-spline triangles:
- fixed corner vertex cases (two boundary edges) in both Far and Osd
2019-02-06 18:30:26 -08:00
Barry Fowler
7b3a471cfb
Merge pull request #1055 from davidgyu/box_spline_tri_boundary_fix
Thanks, David
2019-02-05 18:40:00 -08:00
David G Yu
35065d3a2f
Merge pull request #1054 from barfowl/far_inf_sharp_darts
Fix cracks between triangular Gregory patches at inf-sharp darts
2019-02-05 13:17:44 -08:00
David G Yu
d468aca0a2
Merge pull request #1053 from barfowl/far_patch_is_adaptive
Fixed Far::PatchDescriptor::IsAdaptive() for legacy Gregory
2019-02-05 13:17:28 -08:00
David G Yu
abb8af32c5 Minor changes to BoxSplineTri boundary computation
The computation to adjust patch evaluation weights
for box spline triangle patches to account for boundaries
has been updated to use simple conditional logic instead
of index indirection tables. This results in better register
resource usage for some shader compiler implementations.
Previously, these methods could fail to compile on some
systems.
2019-02-05 12:57:41 -08:00
barry
b83dd92757 Fix cracks between triangular Gregory patches along inf-sharp dart edges:
- corrected regular vs irregular assignment of the quartic mid-edge point
2019-02-04 11:19:24 -08:00
barry
de29bc897f Fix Far::PatchDescriptor::IsAdaptive() for legacy Gregory patches:
- determine based on patch type ID rather than control point count
2019-02-04 11:04:26 -08:00
David G Yu
480afc0189
Merge pull request #1052 from barfowl/far_tri_ptex_adjacency
Removed triangular restriction in Far Ptex adjacency query
2019-02-03 09:52:22 -08:00
David G Yu
e4375aea9e
Merge pull request #1048 from barfowl/glsl_adaptive_tess_levels
Minor refactoring of GLSL functions to compute adaptive tess levels
2019-01-31 00:54:06 -08:00
barry
d1f601ef9b Enabled Far::PtexIndices::GetAdjacency() for triangular refinement 2019-01-30 20:55:18 -08:00
Barry Fowler
cbbfc5b64b
Merge pull request #1049 from davidgyu/glsl_gregory_tri_varying_fix 2019-01-30 20:10:11 -08:00
barry
e8fdec9f88 Made use of newer GLSL adaptive tess functions in patch shaders:
- replaced use of "LimitPoints" functions in all patch shaders
    - removed the unreleased "LimitPointsTriangle" functions
    - added internal tess functions for processing patch boundaries
    - updated Bezier quad and tri tess evaluation to use boundary functions
2019-01-30 10:25:04 -08:00
barry
e8859cac85 Added GLSL adaptive tess functions to reflect associated patch types:
- renamed core "LimitPoints" functions to reflect the patch type (Bezier)
    - overloaded new functions with the additionally computed tess level
    - preserved stubs of all "LimitPoints" functions for compatibility
2019-01-30 10:12:15 -08:00
David G Yu
62ae245b9a
Merge pull request #1047 from barfowl/far_adapt_refine_options
New method to determine adaptive refinement options from choices for patches
2019-01-29 09:29:46 -08:00
barry
673088637b Added public method to derive adaptive refinement options from patch options:
- PatchTableFactory::Options method returns TopologyRefiner::AdaptiveOptions
    - far/tutorial_6 and 9 updated to illustrate use of the new method
2019-01-28 18:02:12 -08:00