Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
David G Yu
ff34c514f5 Improved patch basis eval for Osd to match Far
This updates the patch basis evaluation functions in Osd
to match recent changes to far/patchBasis.

This also exposes a common facility for dealing with PatchCoord,
PatchArray, and PatchParam. These are exposed as global functions
operating on struct data, since C++ style class methods are not
supported by all of the Osd shader and kernel execution envirionments.

Changes:
    - Merged far/patchBasis.cpp to osd/patchBasisCommon{,Types,Eval}.h
    - Exposed PatchCoord, PatchArray, and PatchParam to Osd kernels
    - exposed OsdEvaluatePatchBasis and OsdEvaluatePatchBasisNormalized
    - Updated CPU, TBB, Omp, CUDA, OpenCL, GLSL, HLSL, and Metal evaluators
    - Updated glFVarViewer
2018-11-15 17:11:50 -08:00
David G Yu
58d867feea Fixed a typo in MTLPatchShaderSource
This fixes a shader compile error when enabling
the OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES option.
2017-07-25 12:15:31 -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