Commit Graph

19 Commits

Author SHA1 Message Date
David G Yu
4789df9522 Mtl implementation mtlViewer support for Loop
Updated mtlViewer to support drawing of tessellated
Loop scheme meshes.
2019-05-30 10:04:02 -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
4d84b6ff9b Mtl implementation fixed mtlViewer fractional tess
Fixed mtlViewer to be more consistent with the other
example viewers and allow screen space tessellation
to be enabled independently from fractional tessellation.
2019-05-30 00:47:50 -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
ed8ecd84d1 Mtl implementation example options
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
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
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
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
b7470bb26f Moved definition of struct ShapeDesc into same header file as Shape:
- added definition to regression/common/shape_utils.h
    - removed examples/common/shapeDesc.h and all references to it
    - removed local definitions of ShapeDesc from examples, regressions, etc.
    - overloaded Shape::parseObj() with ShapeDesc
    - updated examples to use Shape::parseObj(ShapeDesc const&);
    - removed axis argument to Shape::ParseObj() and ObjAnim::Create()
2019-04-23 12:05:14 -07:00
barry
949dc1dd0d Pruned the overly long list of shapes in example viewers:
- removed redundant, trivial or otherwise poor shapes from viewer lists
    - copied init_shapes.h to glViewer, dxViewer and mtlViewer for consistency
2019-03-22 16:55:30 -07:00
Barry Fowler
9c41e8610a
Merge pull request #1078 from c64kernal/dev_mtlmenu
Mostly cosmetic clean up to the Metal example apps
2019-03-13 13:03:40 -07:00
George ElKoura
39844f807b Mostly cosmetic clean up to the Metal example apps
- Renamed the default "NewApplication" in menus to the real name of the app
- Fixed copyright information in the "About" dialog.
2019-03-09 23:17:23 -08:00
George ElKoura
0f2dd41f0a Fix build of Metal examples when also building GL
This fixes the build when trying to build both the Metal examples
and the GL examples in the same build. The change is an unfortunate
consequence of how dependencies are bundled together in
examples/common and a future task is needed to split up these
dependencies.  The same workaround exists in the DirectX examples as
well and would also benefit from splitting up the dependencies.
2019-03-09 22:58:34 -08:00
barry
20dcd24b9d Updated all example source for consistent inclusion of header files:
- prepend the opensubdiv directory to all library headers included
    - removed the opensubdiv directory from all declared include paths
2019-01-31 10:49:02 -08:00
barry
c424594625 Major step towards consistent use of include paths in source files:
- changed the main OPENSUBDIV_INCLUDE_DIR to exclude ./opensubdiv
    - updated CMakeLists.txt files in non-examples to use only this path
    - updated CMakeLists.txt files in examples to append ./opensubdiv to path
    - updated source in regression/common to use #include <opensubdiv/...>
    - updated source in examples/common to use #include <opensubdiv/...>
    - deferred source in examples to be updated on a case-by-case basis
2018-10-09 10:51:31 -07:00
David G Yu
6e02082bd7 Metal patch shader changes for degenerate normals
Updated Metal patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.

Also, added missing inf sharp test cases to mtlViewer.
2017-12-12 08:46:00 -08:00
David G Yu
1adfda5d79 Fixed mtlViewer face-varying evaluation
Updated the mtlViewer to compute correct offsets
for face-varying param and index buffers when using
the Gregory Basis end cap approximation.
2017-07-13 17:22:16 -07:00
Nicholas Blasingame
bdca520459 Added fvar support for metla as well as a ui for fvar. 2017-06-05 15:06:47 -07:00
Michael Harris
30cd2df37c Added Metal support 2017-04-19 16:49:53 -07:00