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.
Updated HLSL patch shaders to resolve degenerate normals.
This fix was ported from the GLSL patch shader source.
Also, added missing inf sharp test cases to dxViewer.
- modified Gregory patch shader to use existing Bezier patch evaluation
- rewrote Bezier patch evaluation to use intermediate bilinear points
- added detection and resolution of degenerate normal
- eval normal partials no longer uses Weingarten eqns (requires N != 0)
- updated normal partials to use differentiation/projection
Updated MtlComputeEvaluator documentation to be
consistent with the documentation for other compute
evaluator implementations and fixed missing or
incorrect doxygen tags.
Also, updated the overloads for the EvalStencils
and EvalPatches methods to account for 1st and
2nd derivative evaluation.
Most GL implementations support a maximum of 4 transform
feedback buffer bindings. With the addition of 1st and 2nd
derivative evaluation up to 6 bindings might be required,
i.e. dst, du, dv, duu, duv, dvv.
This change extends the GLXFB Evaluator interface to allow
a client to specialize the evaluator when it is known that
(at least) the 1st derivative and 2nd derivative outputs
are interleaved together into shared buffers.
When this option is used, the maximum number of transform
feedback buffer bindings can be reduced to 3 instead of 6.
Now that Far::LimitStencilTable and Far::PatchTable
support evaluation of 1st and 2nd derivatives the
Osd Evaluator API for evaluating stencils and patches
has been updated to match.
- added Far::PatchTableFactory::Options::generateLegacySharpCornerPatches
- legacy behavior of sharp patches at smooth corners preserved by default
- added corresponding option bit to Osd::MeshBits
- updated examples/glViewer with option
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.
Didn't bother with Hbr library.
Comments only, no functional changes.
The symbol OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES
determines the method used to compute derivative weights
for Gregory basis patches.
Setting this symbol during CMake configuration (and
hence during C++ and shader compilation) will enable
the use of true derivative weights.
The default behavior is to use a simpler approximation
for consistency with earlier releases.
The methods which return arrays of FVarPatchParam have
been made plural, e.g. GetFVarPatchParams(), for consistency
with the other methods in PatchTable.
Also fixed a missing doxygen tag.
Recent CUDA SDKs no longer support the "compute_11"
gpu architecture. We now fallback to "compute_20"
instead for newer SDK versions. Additionally, this
behavior can be overriden using the new CMake list
variable OSD_CUDA_NVCC_FLAGS so that it is easier
for clients to target newer architectures and specify
additional arguments.
Implemented EvalPatchesVarying and EvalPatchesFaceVarying
methods for Osd::*Evaluator classes, i.e. cpu, omp, tbb,
GLXFB, GLSLCompute, OpenCL, and CUDA.
Also, the GPU Kernel implementations have been updated to use
the common patchBasis implementation instead of re-implementing
methods to compute patch basis weights locally.
This is used to compute patch basis weights for
the Osd::*Evaluator classes that are unable to
use the C++ implementation from far/patchBasis.h,
e.g. the GLSL, HLSL, OpenCL, and CUDA kernels.
Instead of duplicating this code for each different
kernel language, we share a single implementation
which is minimally adapted to accommodate specific
language restrictions and syntax.
This implementation can also be used by client
shader code executed while drawing, e.g. to
compute patch basis weights for evaluating varying
and face-varying patches.
This reverts most of the recent changes to the
organization of Far::PatchParam. In particular,
the core parameterization is no longer exposed
as a speparate PatchParamBase class.
We'll revisit this again in a later release, but
for now we will stick with a more straight
forward implementation.
These methods now compute the patch basis in terms
of Far::PatchParamBase instead of Far::PatchParam
This allows these methods to be more easily reused
for evaluating patches for face-varying data.
This change make the bspline patch tess control/hull shader revert to
control vertex mirroring for boundary edges when the patch sharpness is
zero. This change helps improve some shader codegen optimization and
L1 cache behavior on (at least) Kepler GPUs with recent drivers.
Re-organized the single-crease patch code path in the tessellation
control/hull shaders to improve performance in the case where no patches
have non-zero crease sharpnesses.
Changed a couple of local 4x4 matrices to global uniforms to
work around a performance problem on recent GL drivers.
There are two local 4x4 float matrices with constant initializers
in the function OsdComputePerPatchVertexBSpline(...). Changing
these from local variables to global initialized uniforms improves
performance dramatically on recent NVIDIA drivers (e.g. 361.48 windows).
There is no such difference with Direct3D, but this change updates
the shader code for both implementations for consistency.