33 #define BVH_EPSILON 0.01f
65 printf(
"GPU-CPU visibility transfer time: %.2f (ms)\n", transferTime*1.0e3f);
103 for (
int i = 0; i < rootSpec.numRef; i++)
111 for (
int j = 0; j < 3; j++)
112 m_refStack[last].bounds.grow(verts[tris[i][j]]);
116 rootSpec.bounds.grow(
m_refStack[last].bounds);
125 rootSpec.numRef = last;
150 root =
buildNode(rootSpec, 0, rootSpec.numRef-1, 0, 0.0f, 1.0f);
157 printf(
"OcclusionBVHBuilder: progress %.0f%%, duplicates %.0f%%\n",
167 int lastInvisible = -1;
168 for (
int i = 0; i < rootSpec.numRef; i++)
176 for(j =
max(lastFound+1, i+1); j < rootSpec.numRef; j++)
187 if(j >= rootSpec.numRef - 1)
191 for (
int j = 0; j < 3; j++)
198 visibleSpec.bounds.grow(
m_refStack[i].bounds);
200 invisibleSpec.bounds.grow(
m_refStack[i].bounds);
204 invisibleSpec.numRef = lastInvisible+1;
205 visibleSpec.numRef = rootSpec.numRef - invisibleSpec.numRef;
226 printf(
"OcclusionBVHBuilder: progress %.0f%%, duplicates %.0f%%\n",
252 printf(
"OcclusionBVHBuilder: progress %.0f%%, duplicates %.0f%%\n",
277 printf(
"OcclusionBVHBuilder: progress %.0f%%, duplicates %.0f%%\r",
292 F32 area = spec.bounds.area();
296 bool osahChosen =
false, osahTested =
false;
321 #if defined(BUILD_SSAH)
323 #elif defined(BUILD_ASBVH)
325 #elif defined(BUILD_OSAH)
329 #if defined(BUILD_SSAH) || defined(BUILD_ASBVH) || defined(BUILD_OSAH)
333 AABB overlap =
object.leftBounds;
343 F32 minSAH =
min(leafSAH,
object.sah, spatial.sah);
353 if (osahChosen || minSAH == spatial.sah)
355 if (!left.numRef || !right.numRef)
361 axis =
object.sortDim;
372 F32 progressMid =
lerp(progressStart, progressEnd, (
F32)right.numRef / (
F32)(left.numRef + right.numRef));
374 BVHNode* rightNode =
buildNode(right, start+left.numRef, end, level + 1, progressStart, progressMid);
375 BVHNode* leftNode =
buildNode(left, start, start+left.numRef-1, level + 1, progressMid, progressEnd);
379 return new InnerNode(spec.bounds, rightNode, leftNode, axis, splitType, osahTested);
381 return new InnerNode(spec.bounds, leftNode, rightNode, axis, splitType, osahTested);
392 S32 visibleLeft, visibleRight;
397 char dimStr[] = {
'x',
'y',
'z'};
425 for (
int i = end-start; i > 0; i--)
431 rightBounds.
grow(refPtr[i].bounds);
439 for (
int i = 1; i < end-start+1; i++)
444 visibleLeft += visPtr[i - 1];
445 visibleRight -= visPtr[i - 1];
447 leftBounds.
grow(refPtr[i - 1].bounds);
458 split.leftBounds = leftBounds;
470 buffer->
writef(
"%d\t%f\n", i, sah);
497 S32 visibleLeft, visibleRight;
502 char dimStr[] = {
'x',
'y',
'z'};
530 for (
int i = end-start; i > 0; i--)
536 rightBounds.
grow(refPtr[i].bounds);
544 for (
int i = 1; i < end-start+1; i++)
550 visibleLeft += visPtr[i - 1];
551 visibleRight -= visPtr[i - 1];
553 leftBounds.
grow(refPtr[i - 1].bounds);
565 F32 probL = weight * (float)visibleLeft/(
float)spec.
numVisible + (1.0f - weight) * leftBounds.
area()/spec.bounds.area();
566 F32 probR = weight * (float)visibleRight/(
float)spec.
numVisible + (1.0f - weight) *
m_rightBounds[i - 1].area()/spec.bounds.area();
571 if(osah < osplit.sah)
576 osplit.leftBounds = leftBounds;
590 split.leftBounds = leftBounds;
603 buffer->
writef(
"%d\t%f\t%f\n", i, sah, osah);
605 buffer->
writef(
"%d\t%f\t%f\n", i, sah, (
float)2.0
f*spec.numRef);
624 S32 largerChild =
FW::max(split.numLeft, spec.numRef - split.numLeft);
626 if(osplit.sah <
FW_F32_MAX && hidTris > largerChild)
644 left.numRef = split.numLeft;
645 left.bounds = split.leftBounds;
648 right.numRef = spec.numRef - split.numLeft;
649 right.bounds = split.rightBounds;
660 Vec3f origin = spec.bounds.min();
662 Vec3f invBinSize = 1.0f / binSize;
681 for (
int refIdx = start; refIdx < end+1; refIdx++)
690 for (
int i = firstBin[
dim]; i < lastBin[
dim]; i++)
729 int rightNum = spec.numRef;
751 split.pos = origin[
dim] + binSize[
dim] * (
F32)i;
769 Vec3f origin = spec.bounds.min();
771 Vec3f invBinSize = 1.0f / binSize;
773 S32 visibleLeft, visibleRight;
778 char dimStr[] = {
'x',
'y',
'z'};
796 for (
int refIdx = start; refIdx < end+1; refIdx++)
805 for (
int i = firstBin[
dim]; i < lastBin[
dim]; i++)
844 int rightNum = spec.numRef;
877 F32 probL = weight * ((float)(visibleLeft)/(float)spec.
numVisible) + (1.0f - weight) * leftBounds.
area()/spec.bounds.area();
878 F32 probR = weight * ((float)(visibleRight)/(float)spec.
numVisible) + (1.0f - weight) *
m_rightBounds[i - 1].area()/spec.bounds.area();
881 if (osah < osplit.sah)
885 osplit.pos = origin[
dim] + binSize[
dim] * (
F32)i;
897 split.pos = origin[
dim] + binSize[
dim] * (
F32)i;
909 buffer->
writef(
"%d\t%f\t%f\n", i, sah, osah);
911 buffer->
writef(
"%d\t%f\t%f\n", i, sah, (
float)2.0
f*spec.numRef);
931 if(osplit.sah <
FW_F32_MAX && hidTris > smallerChild)
1145 int leftStart = start;
1146 int leftEnd = leftStart;
1147 int rightStart = end+1;
1148 left.bounds = right.bounds =
AABB();
1151 for (
int i = leftEnd; i < rightStart; i++)
1155 if (refs[i].bounds.max()[split.dim] <= split.pos)
1157 left.bounds.grow(refs[i].bounds);
1161 swap(refs[i], refs[leftEnd]);
1168 else if (refs[i].bounds.min()[split.dim] >= split.pos)
1170 right.bounds.grow(refs[i].bounds);
1175 swap(refs[i], refs[rightStart]);
1183 while (leftEnd < rightStart)
1192 AABB lub = left.bounds;
1193 AABB rub = right.bounds;
1194 AABB ldb = left.bounds;
1195 AABB rdb = right.bounds;
1196 lub.
grow(refs[leftEnd].bounds);
1197 rub.
grow(refs[leftEnd].bounds);
1208 swap(refs[leftEnd], refs[rightStart]);
1227 F32 unsplitLeftSAH = lub.
area() * lbc + right.bounds.area() * rac;
1228 F32 unsplitRightSAH = left.bounds.area() * lac + rub.
area() * rbc;
1229 F32 duplicateSAH = ldb.
area() * lbc + rdb.
area() * rbc;
1230 F32 minSAH =
min(unsplitLeftSAH, unsplitRightSAH, duplicateSAH);
1252 swap(refs[leftEnd], refs[rightStart]);
1270 refs[leftEnd] = lref;
1283 left.numRef = leftEnd - leftStart;
1284 right.numRef = end+1 - rightStart;
1297 return (ca < cb || (ca == cb && ra.
triIdx < rb.
triIdx));
bool enablePrints
Flag whether to enable prints about build progress.
Stucture holding the BVH build parameters.
virtual ~OcclusionBVHBuilder(void)
Maximum depth of the BVH tree.
const char * getPtr(void) const
Buffer & getTriVtxIndexBuffer(void)
Returns buffer of triangle's vertex indieces.
void sort(void *data, int start, int end, SortCompareFunc compareFunc, SortSwapFunc swapFunc, bool multicore=false)
SpatialSplitOcl findSpatialOccludeSplit(const NodeSpecOcl &spec, int start, int end, F32 nodeSAH)
FW_CUDA_FUNC const Vec3f & max(void) const
Array< Reference > m_refStack
Reference stack.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid * data
BVHNode * buildNode(NodeSpec spec, int level, F32 progressStart, F32 progressEnd)
Builds a BVH node. The built node may be an inner node as well as a leaf node.
Buffer & getVtxPosBuffer(void)
Returns vertex position buffer.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint GLfloat GLfloat GLfloat z GLuint GLint GLenum GLboolean GLsizei const GLvoid pointer GLuint GLuint const GLchar name GLenum GLsizei GLenum GLsizei GLsizei height GLenum GLuint renderbuffer GLenum GLenum GLint * params
Array< AABB > m_rightBounds
Bounding boxes of all the possible right children.
BVHNode * createLeaf(const NodeSpec &spec)
Builds a leaf node.
OcclusionBVHBuilder(BVH &bvh, const BVH::BuildParams ¶ms, const Vec3f &cameraPosition)
BVH & m_bvh
BVH being built.
const U8 * getPtr(S64 ofs=0)
F32 splitAlpha
Spatial split area threshold.
SpatialBinOcl m_bins[3][NumSpatialBins]
const BVH::BuildParams & m_params
Build parameters.
S getNumBytes(void) const
S32 m_numDuplicates
Number of duplicated references.
ObjectSplitOcl findObjectSplit(const NodeSpecOcl &spec, int start, int end, F32 nodeSAH)
SpatialSplitOcl findSpatialSplit(const NodeSpecOcl &spec, int start, int end, F32 nodeSAH)
BVHNode * buildNode(const NodeSpecOcl &spec, int start, int end, int level, F32 progressStart, F32 progressEnd)
const Platform & m_platform
Platform settings.
Array< S32 > & getTriIndices(void)
Returns an array of triangle indices to which leaf nodes are pointig. These indices point to scene's ...
F32 osahWeight
Weighting factor for OSAH construction.
const T & getLast(void) const
Scene * getScene(void) const
FW_CUDA_FUNC float area(void) const
FW_CUDA_FUNC bool valid(void) const
FW_CUDA_FUNC T min(const VectorBase< T, L, S > &v)
FW_CUDA_FUNC T max(const VectorBase< T, L, S > &v)
S32 m_sortDim
Sort dimension. Used by sort method.
int getNumTriangles(void) const
BVH acceleration structure class.
ObjectSplitOcl findObjectOccludeSplit(const NodeSpecOcl &spec, int start, int end, F32 nodeSAH)
static void sortSwap(void *data, int idxA, int idxB)
F32 m_minOverlap
Minimum overlap of the left and right AABB of the object split needed to make spatial split worth fin...
Maximum depth of the BVH where spatial split will still be used.
void splitReference(Reference &left, Reference &right, const Reference &ref, int dim, F32 pos)
Splits the triangle's bounding box.
String logDirectory
Directory where the log file will be saved.
void performObjectSplit(NodeSpecOcl &left, NodeSpecOcl &right, const NodeSpecOcl &spec, int start, int end, const ObjectSplitOcl &split)
SplitType
Available split types.
static bool sortCompare(void *data, int idxA, int idxB)
FW_CUDA_FUNC const Vec3f & min(void) const
String sprintf(const char *fmt,...)
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int dim
virtual BVHNode * run(void)
Buffer * visibility
Visibility buffer for the CPU renderer.
Array< S32 > m_visibility
int cameraIdx
Camera index.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction f
Number of spatial bins per node in each axis.
FW_CUDA_FUNC void grow(const Vec3f &pt)
Class performing SBVH build.
void printf(const char *fmt,...)
S32 triIdx
Index of the triangle.
FW_CUDA_FUNC F64 log(F64 a)
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level
FW_CUDA_FUNC void swap(T &a, T &b)
String buildName
Build name.
T set(S idx, const T &item)
void performSpatialOccludeSplit(NodeSpecOcl &left, NodeSpecOcl &right, int &start, int &end, const SpatialSplitOcl &split)
BVH virtual node. Parent class of both a leaf node and an inner node.
AABB bounds
Bounding box of the triangle.
void writef(const char *fmt,...)
const T * getPtr(S idx=0) const
Structure holding triangle's index together with its bounding box.
FW_CUDA_FUNC void intersect(const AABB &aabb)
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint GLfloat GLfloat GLfloat z GLuint GLint GLenum GLboolean GLsizei const GLvoid pointer GLuint GLuint const GLchar name GLenum GLsizei GLenum GLsizei GLsizei height GLenum GLuint renderbuffer GLenum GLenum GLint params GLuint GLsizei range GLuint GLsizei const GLubyte GLsizei GLenum const GLvoid coords GLuint GLsizei GLsizei GLsizei const GLubyte GLsizei GLenum const GLvoid coords GLuint GLenum GLsizei const GLvoid pathString GLuint GLenum const GLvoid GLbitfield GLuint GLsizei GLenum GLuint GLfloat emScale GLuint GLuint srcPath GLuint GLuint GLenum const GLfloat transformValues GLuint GLenum GLint value GLuint GLenum GLfloat value GLenum GLint ref
FW_CUDA_FUNC A lerp(const A &a, const A &b, const B &t)
Timer m_progressTimer
Progress timer.
bool twoTrees
Flag whether to build BVH from two separate trees.