Patches with transition edges were not being tessellated
correctly when drawing multiple patch types, e.g. with
Gregory or Legacy Gregory approximation at irregular features,
because the per-patch tess factors buffer was not being
offset correctly for the draw command for each patch type.
Fixed this to be consistent with other patch drawing by
recording and applying offsets when binding this buffer
for each patch type, and making sure that attributes for
the tess factors buffer are bound when drawing Legacy Gregory
patch types.
Removed the use of the LOOP preprocessor symbol from
the remaining example shader code. The shader code is now
configured according to the types of the resulting patches
without depending on the subdivision scheme of the mesh
topology.
Removed the use of the LOOP preprocessor symbol from
the glFVarViewer shaders code. The shader code is now
configured according to the types of the resulting patches
without depending on the subdivision scheme of the mesh
topology.
Improved the implementation of face-varying interpolation
similar to the glFVarViewer. Now the face-varying patch
type is obtained from the face-varying patch array
descriptor instead of being hard-coded by subdivison scheme.
Removed the use of the LOOP preprocessor symbol from
the glFVarViewer shaders code. The shader code is now
configured according to the types of the resulting patches
without depending on the subdivision scheme of the mesh
topology.
This allows the implementation of face-varying interpolation
to be improved and simplifies both the shader code and
application code.
Also, fixed a couple of incorrect buffer/texture bindings
that were raising GL errors.
Changed several default options in the example viewers to the
preferred settings for improved shape fidelity and to improve
consistency between the different viewers:
- enabled smooth corner, and inf sharp patch options by default
- disabled screenspace tess and fractional tess by default
- changed the default approximation to Gregory in the mtlViewer
The normal computed for primitive triangles had a flipped
orientation in the glViewer, This caused linear approximating
patches to be shaded incorrectly for adaptively refined Loop
meshes, and similarly triangles resulting from uniformly refined
Loop meshes.
- fixed memory leaks and added asserts and errors for bad input data
- restructured the CSV output to a line per test and renamed flag to -csv
- added options -nopatches, -nostencils and -total options to reduce output
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
Added a -spreadsheet option to far_perf which outputs
result data as comma separated values (CSV) which can
be imported directly into spreadsheet applications for
further analysis and charting.
Also, updated the other far_perf options to be more consistent
with the other tutorials and examples, e.g. when specifying
scheme types, refinement options, etc.
- included shapes added in recent pull requests
- removed old shapes made redundant by recent additions
- ordered Catmark and Loop sets for consistency
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.
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.
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.
Fixed mtlViewer to be more consistent with the other
example viewers and allow screen space tessellation
to be enabled independently from fractional tessellation.
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
Updated the Metal viewer runtime options to more
closely match the other viewers:
- default to adaptive tessellation
- default to patch type coloring
- present end cap options as: Linear/Regular/Gregory
- exposed switches for patch refinement options:
smooth corner, single crease, inf sharp
- updated fvar linear interpolation labels
and methods to match glFVarViewer
- updated iOS Main.storyboard GUI to match
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.