14 #ifndef __GT_GPUTrace__
15 #define __GT_GPUTrace__
46 virtual int priority()
const = 0;
67 , myHandleType(PHT_GT)
71 , myHandleType(PHT_GU)
83 int myCullBackFaceMode = 0;
84 int myVisibilityCullBackFaceMode = 0;
138 if (myOcclusion && myOcclusionSamples)
139 totalrays += myOcclusionSamples;
140 if (myCavity && myCavitySamples)
141 totalrays += myCavitySamples;
142 if (myCurvature && myCurvatureSamples)
143 totalrays += 2 * myCurvatureSamples;
144 if (myThickness && myThicknessSamples)
145 totalrays += myThicknessSamples;
146 if (myEdge && myEdgeSamples)
147 totalrays += myEdgeSamples;
148 if (myRoundedNormal && myRoundedNormalSamples)
149 totalrays += myRoundedNormalSamples;
154 return (myEdge && myEdgeSamples > 0) ||
155 (myRoundedNormal && myRoundedNormalSamples > 0);
158 bool myOcclusion =
true;
159 int myOcclusionSamples = 64;
160 float myOcclusionMaxDist = -1;
161 float myOcclusionRayBias = 0.001;
163 bool myThickness =
true;
164 int myThicknessSamples = 16;
165 float myThicknessRayBias = 0.001;
167 bool myCavity =
true;
168 int myCavitySamples = 16;
169 float myCavityMaxDist = -1;
170 float myCavityBias = 0.5;
171 float myCavityRayBias = 0.001;
173 bool myCurvature =
true;
174 int myCurvatureSamples = 16;
175 float myCurvatureBias = 0.5;
176 float myCurvatureSDist = 0.1;
177 float myCurvatureScale = 1;
178 float myCurvatureRayBias = 0.002;
181 int myEdgeSamples = 4;
182 float myEdgeRayBias = 0.001;
183 float myEdgeRadius = 0.01f;
184 float myEdgeCuspAngle = 30.f;
190 bool myRoundedNormal =
true;
191 int myRoundedNormalSamples = 4;
192 float myRoundedNormalRayBias = 0.001;
193 float myRoundedNormalRadius = 0.01f;
194 float myRoundedNormalCuspAngle = 30.f;
195 int myRoundedNormalMode = 0;
197 float myTraceRayBias = 1e-3
f;
199 int myPixelSamples = 1;
259 static constexpr
uint AO_SEED = 0x4c41e0cd;
260 static constexpr
uint CV_SEED = 0xf2ee2275;
261 static constexpr
uint CU_N_SEED = 0x4b65c61e;
262 static constexpr
uint CU_P_SEED = 0x9a4bf788;
263 static constexpr
uint TH_SEED = 0x4c910506;
264 static constexpr
uint EG_SEED = 0x139fa345;
265 static constexpr
uint RN_SEED = 0xe4df7f01;
266 static constexpr
uint PIXEL_SEED = 0x73aecd3d;
282 virtual void computeBaking(
exint nrays,
293 float *cavity =
nullptr,
294 float *curvature =
nullptr,
295 float *thickness =
nullptr,
296 float *edge =
nullptr,
299 static inline float vop_bias(
float base,
float bias)
305 return SYSsafediv(bias, (1 + (SYSsaferecip(base) - 2)*(1-bias)));
317 {
return myData && myEntries > 0; }
331 bool myLeftHanded =
false;
334 int myCullBackFaceMode = 0;
335 int myVisibilityCullBackFaceMode = 0;
356 myVertexStorage.reset();
358 myAttributes.clear();
369 const BakingOptions& opts) = 0;
387 const TraceSet& getTheAllTraceset()
const;
GLuint GLsizei const GLchar * label
UT_BitArray mySelfBitArray
bool needSelfTraceset() const
#define SYS_VISIBILITY_EXPORT
UT_StringHolder myVisibilityTraceset
UT_Map< UT_Set< int >, TraceSet > myMeshSetToTraceSet
GT_GPUTrace(const Factory &factory)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
UT_Array< UT_StringRef > myFacesSet
GT_GPUTrace::GT_GPUTracePtr GT_GPUTracePtr
static const UT_Matrix4T< float > & getIdentityMatrix()
static const UT_StringHolder theEmptyString
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
UT_BitArray myIdentifierBitArray
UT_StringMap< AttribInfo > myAttributes
PrimitiveInfo(const GT_PrimitiveHandle &handle)
GLuint const GLchar * name
exint raysPerPoint() const
const UT_StringHolder & label() const
GU_ConstDetailHandle myGUHandle
PrimitiveInfo(const GU_ConstDetailHandle &handle)
UT_UniquePtr< GT_GPUTrace > GT_GPUTracePtr
static float vop_bias(float base, float bias)
GT_DataArrayHandle myBuffer
SYS_VISIBILITY_EXPORT void newGPUTrace()
UT_StringMap< UT_Set< int > > myTracesetNameToMeshes
UT_Set< int > myVisiblityMeshes
UT_BitArray myVisibilityBitArray