This is the first step to tease off Osd compute controller/contexts
from Far API.
Currently FarStencilTable only creates a kernelbatch for the entire range,
so we can use [0, numStencils) for all cases instead of KernelBatch.
This might not be true if we apply non-factorized level-wise stencils,
then we'll add another modular utility to serve those cases.
PatchTablesFactory fills 20 indices topology into patchtable, and use it for eval and draw.
note: currently screen-space adaptive tessellation of gregory basis patches is
broken and cracks appear around them.
When CLEW is present, CL functions become macros which may resolve to null
function pointers. A previous change attempted to guard against CL-related
crashes, but introduced compiler warnings.
This change conditionally tests the function when CLEW is present.
Resolves: #400
- extend Far::PatchTables data structures & interfaces to store requisite
information for channels of face-varying bi-cubic patches
- implement gather function in Far::PatchTablesFactory to populate face-varying
channels with adaptive patches
- extend accessor interface in Vtr::Level
- propagate code fall-out throughout OpenSubdiv code base, examples & tutorials
- extend vtrViewer code to visualize tessellated bi-cubic face-varying patches
- recent MSVC versions attempt to compile files with hlsl
extensions when passed on the command-line. This breaks
the build because these files are not meant to be compiled
directly by MSVC. I removed the dependency from the
CMakeList to prevent this from happening.
- changed ptex layout data types in shaders to match srv format
- changed ptex srv type to unorm format for uchar data
- fixed hlsl compiler warning: initialized edgeDistance of OutputVertex struct in domain shader even if we are not in wireframe mode
- added directx debug device and enabled automatic break points to easily spot dx errors
- renamed Sdc::Type to SchemeType and TypeTraits to SchemeTypeTraits
- renamed TYPE_ prefix to SCHEME_
- updated all usage within core library
- updated all usage in examples, tutorials, etc.
- move level of refinement / isolation into the Options structs
- fix splash damage in rest of the code
note 1: this is less than ideal, because most compilers accept the previous
call to these functions with an incorrect parameter list (ie. passing
the level instead of the struct issues no warnings and compiles...)
caveat emptor...
note 2: the level parameter names may not be final for adaptive modes
as we will likely want independent controls over crease vs.
extraordinary vertex isolation.
- don't rotate (s,t) coordinates but rotate the patch instead !
- refactor osd/cpuEvalLimitKernels to share Far::PatchTables cubic spline
interpolation functions : this replaces tensor product formulation with
weight matrices, which does not really impact performance here, but would
have to be replaced when implementing regular gridding functions.
- fix OsdCpuEvalLimitController to not rotate coordinates and pass the rotation bitfields
- expose Far::PatchTables spline interpolation API (protected -> public)
- fix glEvalLimit tangent buffers (remove empty padding - see below)
- change policy for tangent buffers : the output buffer descriptor is
**NO LONGER APPLIED** to tangent output buffers. Tangent primvar data
buffers are no longer applying the offset and stride from the descriptor
(because it doesn't make sense to share it). If more flexiblity is
required, we will consider adding independent descriptors for the tangent
buffers. This change will impact existing code that generates tangents
with the EvalLimit controller.
fixes#370
- change topology refiner to check for edge sharpnesses when selecting faces for isolation
- add face-aggregator for edge tags to Vtr::Level
- fix logic in Far::PatchTablesFactory to correctly tag single-crease patches along infinitely sharp edges
note : this fix is a bit of a cludge - barfowl confirms that the vertex crease tags (VTags) are intended to
carry neighborhood information, which they currently do not. we will revisit this shortly and fix the tags,
which will allow us to simplify the traversal logic when isolating topology features.
fixes#369
Const' declared instances of Vtr::Array do not protect the pointer held
privately by the class properly. In order to force the compiler to
protect this pointer, we removed all non-const accessors from Vtr::Array
(now renamed Vtr::ConstArray) and moved them to a child class (Vtr::Array),
which requires const_cast<> operators internally to allow access.
The change & renaming is then propagated to all internal dependencies.
- VVarBoundaryInterpolation is now VtxBoundaryInterpolation
- enum prefix change from VVAR to VTX
- generel cleanup / doxyfication
- update of beta / release notes
- make sure we don't get conflicting enums (CODE_ERROR)
- fix template specialization for Far::TopologyRefinerFactory in regression/common/vtr_utils
- fix remaining error reporting code around osd
- change error codes from situational to general (fatal / coding / run-time...)
- pull error functions from Osd into Far
- add a templated topology validation reporting system to Far::TopologyRefinerFactory
- fix fallout on rest of code-base
- split Far::PatchDescriptor into its own class (mirrors Far::PatchParam)
- hide PatchArray as a private internal structure
- add public accessors patterned after Far::TopologyRefiner (returning Vtr::Arrays)
- propagate new API to all dependent code
note: some direct table accessors have not been removed *yet* - see code for details
- adding support for StencilTables creation from a Gregory basis
- fix a bug in the prot-stencil allocator (slow memory pool was not being cleared properly)
- adaptive mode: remove faces tagged as holes from the selection of faces to isolate
- uniform mode: faces tagged as holes are still included in the refinement process,
however they are removed from patch tables
- future improvements: add a 'selective refinement' code path separate from 'uniform refinement'
to handle this case without un-necessary subdivision work.
- re-implement the pool allocator
- use templates to remove code redundancy between regular & limit stencils
- leverage [] operator overloading to simplify stencil factorization
- add the ability to treat subdivision levels independently (see below)
- refactor Far::TopologyRefiner::Interpolate<>() methods to pass buffers by reference
(allows overloading of [] operator)
- rename some of the stencil factory options
- propagate changes to Osd / examples / tutorials...
Catmull-Clark Subdivision Surfaces", Niessner et al, Eurographics 2012.
This change includes;
-topology identification for single-crease patch during adaptive refinement.
-patch array population (similar to boundary)
-sharpness buffer generation
-glsl shader
Eval stuffs will be coming.
Make the sample locations dynamic by adding a velocity vector. Face boundary
crossing is handled using the new ptex adjacency functionality recently
added to the Far::TopologyRefiner.
- added an option to Far::StencilTablesFactory to generate stencils for
coarse control vertices
- refactored interpolation code out into Far::PatchTables
- corrected tangent interpolation
- code cleanup & comments
Sync'ing the 'dev' branch with the 'feature_3.0dev' branch at commit 68c6d11fc36761ae1a5e6cdc3457be16f2e9704a
The branch 'feature_3.0dev' is now locked and preserved for historical purposes.
- remove obsolete glPushClient functions
note: this code is still duplicated in the ptexViewer (which still needs to be upgraded to the new framebuffer)
fixes#307
If the system has CLEW installed (which is detected by recently
added FindCLEW routines) then OpenSubduv would be compiled against
this library.
It makes binaries and libraries more portable across the systems,
so it's possible to run the same binary on systems with and without
OpenCL SDK installed.
The most annoying part of the change is updating examples to load
OpenCL libraries, but ideally code around controllers and interface
creation is to be de-duplicated anyway.
Based on the pull request #303 from Martijn Berger