Support Forum       G3D Web Page     
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
G3D::VulkanTriTree Class Reference

Inherits G3D::TriTreeBase.

Classes

class  Field
 
struct  SurfaceCacheElement
 
struct  VertexCacheElement
 
struct  VKInteropHandles
 

Public Types

typedef int GeometryIndex
 
typedef unsigned int IntersectRayOptions
 Options for intersectRays. More...
 
typedef int MaterialIndex
 
typedef uint64 SurfaceId
 

Public Member Functions

virtual ~VulkanTriTree ()
 
wave::VKBVH * BVH ()
 
virtual const StringclassName () const override
 
virtual void clear () override
 
shared_ptr< TexturecreateVulkanInteropTexture (const int width, const int height, Texture::Encoding encoding, int vkIndex, const String &texName, bool buffer) const
 
void finalizeAccelerationStructure () const
 
virtual void intersectBox (const AABox &box, Array< Tri > &results) const override
 Returns all triangles that lie within the box. More...
 
virtual bool intersectRay (const Ray &ray, Hit &hit, IntersectRayOptions options=IntersectRayOptions(0)) const override
 Intersect a single ray. More...
 
shared_ptr< SurfelintersectRay (const Ray &ray) const
 Special single-ray CPU function for simplicity. More...
 
virtual void intersectRays (const shared_ptr< Texture > &rayOrigin, const shared_ptr< Texture > &rayDirection, const shared_ptr< Texture > &booleanResults, IntersectRayOptions options=IntersectRayOptions(0)) const override
 
void intersectRays (const shared_ptr< GLPixelTransferBuffer > &rayOrigins, const shared_ptr< GLPixelTransferBuffer > &rayDirections, Array< Hit > &results, IntersectRayOptions options) const
 
virtual void intersectRays (const Array< Ray > &rays, Array< shared_ptr< Surfel >> &results, IntersectRayOptions options=IntersectRayOptions(0), const Array< float > &coneBuffer=Array< float >()) const override
 Values in results will be reused if already allocated, which can increase performance. More...
 
virtual void intersectRays (const Array< Ray > &rays, Array< bool > &results, IntersectRayOptions options=IntersectRayOptions(0)) const override
 
virtual void intersectRays (const Array< Ray > &rays, Array< Hit > &results, IntersectRayOptions options=IntersectRayOptions(0)) const override
 Batch ray casting. More...
 
virtual void intersectRays (const shared_ptr< GLPixelTransferBuffer > &rayOrigin, const shared_ptr< GLPixelTransferBuffer > &rayDirection, const shared_ptr< GLPixelTransferBuffer > results[5], IntersectRayOptions options=IntersectRayOptions(0), const shared_ptr< GLPixelTransferBuffer > &rayCone=nullptr, const int baseMipLevel=0, const Vector2int32 wavefrontDimensions=Vector2int32(-1, -1), const RenderMask mask=0xFF) const override
 
virtual void intersectRays (const shared_ptr< GLPixelTransferBuffer > &rayOrigin, const shared_ptr< GLPixelTransferBuffer > &rayDirection, const shared_ptr< GLPixelTransferBuffer > &booleanResults, IntersectRayOptions options=IntersectRayOptions(0)) const override
 
void intersectRays (const shared_ptr< Texture > &rayOrigins, const shared_ptr< Texture > &rayDirections, const shared_ptr< Texture > &lambertian, const shared_ptr< Texture > &glossy, const shared_ptr< Texture > &emissive, const shared_ptr< Texture > &shadingNormal, const shared_ptr< Texture > &position) const
 
virtual void intersectRays (const shared_ptr< Texture > &rayOrigin, const shared_ptr< Texture > &rayDirection, const shared_ptr< GBuffer > &results, IntersectRayOptions options, const shared_ptr< Texture > &rayCoherence) const override
 
virtual void intersectSphere (const Sphere &sphere, Array< Tri > &triArray) const override
 Returns all triangles that intersect or are contained within the sphere (technically, this is a ball intersection). More...
 
RealTime lastBuildTime () const
 Time at which setContents() or rebuild() was last invoked. More...
 
const Trioperator[] (int i) const
 Array access to the stored Tris. More...
 
virtual void rebuild () override
 Rebuild the tree after m_triArray or CPUVertexArray have been mutated. More...
 
void sample (const Hit &hit, shared_ptr< Surfel > &surfel) const
 
virtual void setContents (const Array< shared_ptr< Surface >> &surfaceArray, ImageStorage newImageStorage=ImageStorage::COPY_TO_CPU) override
 Base class implementation populates m_triArray and m_vertexArray and applies the image storage option. More...
 
virtual void setContents (const shared_ptr< class Scene > &scene, ImageStorage newStorage=ImageStorage::COPY_TO_CPU) override
 
virtual void setContents (const Array< Tri > &triArray, const CPUVertexArray &vertexArray, ImageStorage newStorage=ImageStorage::COPY_TO_CPU)
 
virtual void setContents (const Array< shared_ptr< Surface > > &surfaceArray, ImageStorage newStorage=ImageStorage::COPY_TO_CPU) override
 
void setTimingCallback (wave::TimingCallback *callback, int verbosityLevel)
 Set a timing function callback to print timing details from OptiX. More...
 
int size () const
 
bool supported ()
 If false after construction then VulkanTriTree will not work on this machine and you should switch to EmbreeTriTree. More...
 
const Array< Tri > & triArray () const
 
Array< Tri > & triArray ()
 If you mutate this, you must call rebuild() More...
 
const CPUVertexArrayvertexArray () const
 
CPUVertexArrayvertexArray ()
 If you mutate this, you must call rebuild() More...
 

Static Public Member Functions

static shared_ptr< VulkanTriTreecreate ()
 
static shared_ptr< TriTreecreate (bool preferGPUData=true)
 Create an instance of whatever is the fastest implementation subclass for this machine. More...
 
static shared_ptr< TriTreecreate (const shared_ptr< Scene > &scene, ImageStorage newImageStorage)
 

Public Attributes

RealTime debugConversionOverheadTime = 0
 CPU timing of API conversion overhead for the most recent call to intersectRays. More...
 

Static Public Attributes

static const IntersectRayOptions COHERENT_RAY_HINT = 16
 Make optimizations appropriate for coherent rays (same origin) More...
 
static const IntersectRayOptions DO_NOT_CULL_BACKFACES = 2
 Do not allow the intersector to perform backface culling as an optimization. More...
 
static const IntersectRayOptions NO_PARTIAL_COVERAGE_TEST = 8
 Disable partial coverage (alpha) testing. More...
 
static const IntersectRayOptions OCCLUSION_TEST_ONLY = 1
 Test for occlusion and do not necessarily return valid triIndex, backfacing, etc. More...
 
static const IntersectRayOptions PARTIAL_COVERAGE_THRESHOLD_ZERO = 4
 Only fail the partial coverage (alpha) test on zero coverage. More...
 

Protected Types

using CFrameCache = Table< CFrame, int >
 
using SurfaceCache = Table< SurfaceId, SurfaceCacheElement >
 
using VertexCache = Table< const CPUVertexArray *, VertexCacheElement >
 

Protected Member Functions

 VulkanTriTree ()
 
bool _intersectRay (const Ray &ray, Hit &hit, IntersectRayOptions options) const
 
void compileGLSLShader (const std::string &inputFilename, std::vector< unsigned int > &resultBytes) const
 
void copyToRayPBOs (const Array< Ray > &rays) const
 
int createVulkanMaterial (const shared_ptr< UniversalMaterial > &material)
 
void ensureTextureCached (const shared_ptr< Texture > &tex)
 
void intersectRays (const shared_ptr< GLPixelTransferBuffer > &rayOrigins, const shared_ptr< GLPixelTransferBuffer > &rayDirections, Array< shared_ptr< Surfel >> &results, IntersectRayOptions options) const
 
void registerReallocationAndMapHooks (const shared_ptr< GLPixelTransferBuffer > &t) const
 
void signalVKSemaphore (const shared_ptr< Texture > &tex) const
 
void waitVKSemaphore (const shared_ptr< Texture > &tex) const
 

Static Protected Member Functions

static shared_ptr< TextureconvertToVulkanFormat (shared_ptr< Texture > tex)
 
static void copyToCPU (const shared_ptr< GLPixelTransferBuffer > &rayOrigin, const shared_ptr< GLPixelTransferBuffer > &rayDirection, Array< Ray > &rayBuffer, const int width=-1, const int height=-1)
 
static void copyToCPU (const shared_ptr< GLPixelTransferBuffer > &rayCoherence, Array< float > &rayCoherenceBuffer)
 
template<class T , class ... ArgTypes>
static shared_ptr< T > createShared (ArgTypes &&... args)
 Like std::make_shared, but works for protected constructors. More...
 
static bool optixSupportsTexture (const shared_ptr< Texture > &tex)
 

Protected Attributes

bool glslangInitialized = false
 
wave::VKBVH * m_bvh
 
CFrameCache m_frameCache
 
shared_ptr< Texturem_ignoreTexture
 
Table< shared_ptr< Texture >, VKInteropHandlesm_interopTextureTable
 
RealTime m_lastBuildTime = -1e6
 
Table< shared_ptr< Material >, MaterialIndexm_materialCache
 
int m_nextFrameCacheID = 0
 
int m_outHeight = -1
 
Array< shared_ptr< GLPixelTransferBuffer > > m_outPBOArray
 
int m_outWidth = -1
 
shared_ptr< GLPixelTransferBufferm_rayDirections
 
shared_ptr< GLPixelTransferBufferm_rayOrigins
 
Table< int, weak_ptr< GLPixelTransferBuffer > > m_registeredBufferIDs
 
shared_ptr< CubeMapm_sky
 
SurfaceCache m_surfaceCache
 
Table< GLuint, shared_ptr< Texture > > m_textureCache
 
Array< Trim_triArray
 
CPUVertexArray m_vertexArray
 
VertexCache m_vertexCache
 

Member Typedef Documentation

◆ CFrameCache

using G3D::VulkanTriTree::CFrameCache = Table<CFrame, int>
protected

◆ GeometryIndex

◆ IntersectRayOptions

typedef unsigned int G3D::TriTree::IntersectRayOptions
inherited

Options for intersectRays.

Default is full intersection with no backface culling optimization and partial coverage (alpha) test passing for values over 0.5.

◆ MaterialIndex

◆ SurfaceCache

◆ SurfaceId

◆ VertexCache

Constructor & Destructor Documentation

◆ VulkanTriTree()

G3D::VulkanTriTree::VulkanTriTree ( )
protected

◆ ~VulkanTriTree()

virtual G3D::VulkanTriTree::~VulkanTriTree ( )
virtual

Member Function Documentation

◆ _intersectRay()

bool G3D::TriTree::_intersectRay ( const Ray ray,
Hit hit,
IntersectRayOptions  options 
) const
inlineprotectedinherited

◆ BVH()

wave::VKBVH* G3D::VulkanTriTree::BVH ( )
inline

◆ className()

virtual const String& G3D::VulkanTriTree::className ( ) const
inlineoverridevirtual

Implements G3D::TriTree.

◆ clear()

virtual void G3D::TriTreeBase::clear ( )
overridevirtualinherited

Implements G3D::TriTree.

Reimplemented in G3D::NativeTriTree.

◆ compileGLSLShader()

void G3D::VulkanTriTree::compileGLSLShader ( const std::string &  inputFilename,
std::vector< unsigned int > &  resultBytes 
) const
protected

◆ convertToVulkanFormat()

static shared_ptr<Texture> G3D::VulkanTriTree::convertToVulkanFormat ( shared_ptr< Texture tex)
staticprotected

◆ copyToCPU() [1/2]

static void G3D::TriTreeBase::copyToCPU ( const shared_ptr< GLPixelTransferBuffer > &  rayOrigin,
const shared_ptr< GLPixelTransferBuffer > &  rayDirection,
Array< Ray > &  rayBuffer,
const int  width = -1,
const int  height = -1 
)
staticprotectedinherited

◆ copyToCPU() [2/2]

static void G3D::TriTreeBase::copyToCPU ( const shared_ptr< GLPixelTransferBuffer > &  rayCoherence,
Array< float > &  rayCoherenceBuffer 
)
staticprotectedinherited

◆ copyToRayPBOs()

void G3D::VulkanTriTree::copyToRayPBOs ( const Array< Ray > &  rays) const
protected

◆ create() [1/3]

static shared_ptr<VulkanTriTree> G3D::VulkanTriTree::create ( )
inlinestatic

◆ create() [2/3]

static shared_ptr<TriTree> G3D::TriTree::create ( bool  preferGPUData = true)
staticinherited

Create an instance of whatever is the fastest implementation subclass for this machine.

Parameters
preferGPUDataIf true, use an implementation that is fast for ray buffers already on the GPU.

Referenced by G3D::MeshShape::bspTree().

◆ create() [3/3]

static shared_ptr<TriTree> G3D::TriTree::create ( const shared_ptr< Scene > &  scene,
ImageStorage  newImageStorage 
)
staticinherited

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

◆ createVulkanInteropTexture()

shared_ptr<Texture> G3D::VulkanTriTree::createVulkanInteropTexture ( const int  width,
const int  height,
Texture::Encoding  encoding,
int  vkIndex,
const String texName,
bool  buffer 
) const

◆ createVulkanMaterial()

int G3D::VulkanTriTree::createVulkanMaterial ( const shared_ptr< UniversalMaterial > &  material)
protected

◆ ensureTextureCached()

void G3D::VulkanTriTree::ensureTextureCached ( const shared_ptr< Texture > &  tex)
protected

◆ finalizeAccelerationStructure()

void G3D::VulkanTriTree::finalizeAccelerationStructure ( ) const

◆ intersectBox()

virtual void G3D::TriTreeBase::intersectBox ( const AABox box,
Array< Tri > &  results 
) const
overridevirtualinherited

Returns all triangles that lie within the box.

Default implementation tests each triangle in turn (linear time).

Implements G3D::TriTree.

Reimplemented in G3D::NativeTriTree.

◆ intersectRay() [1/2]

virtual bool G3D::VulkanTriTree::intersectRay ( const Ray ray,
Hit hit,
IntersectRayOptions  options = IntersectRayOptions(0) 
) const
inlineoverridevirtual

Intersect a single ray.

Return value is hit.triIndex != Hit::NONE for convenience.

Parameters
filterFunctionSet to nullptr to accept any geometric ray-triangle instersection.

Implements G3D::TriTree.

◆ intersectRay() [2/2]

shared_ptr<Surfel> G3D::TriTree::intersectRay ( const Ray ray) const
inherited

Special single-ray CPU function for simplicity.

This guarantees a hit...it will synthesize a skybox surfel on a miss if the TriTree was created from a Scene, or return a gray skybox surfel otherwise. This is the absolute slowest way to use a TriTree.

◆ intersectRays() [1/10]

virtual void G3D::TriTreeBase::intersectRays ( const shared_ptr< Texture > &  rayOrigin,
const shared_ptr< Texture > &  rayDirection,
const shared_ptr< Texture > &  booleanResults,
IntersectRayOptions  options = IntersectRayOptions(0) 
) const
overridevirtualinherited

◆ intersectRays() [2/10]

void G3D::VulkanTriTree::intersectRays ( const shared_ptr< GLPixelTransferBuffer > &  rayOrigins,
const shared_ptr< GLPixelTransferBuffer > &  rayDirections,
Array< shared_ptr< Surfel >> &  results,
IntersectRayOptions  options 
) const
protected

◆ intersectRays() [3/10]

void G3D::VulkanTriTree::intersectRays ( const shared_ptr< GLPixelTransferBuffer > &  rayOrigins,
const shared_ptr< GLPixelTransferBuffer > &  rayDirections,
Array< Hit > &  results,
IntersectRayOptions  options 
) const
inline

◆ intersectRays() [4/10]

virtual void G3D::VulkanTriTree::intersectRays ( const Array< Ray > &  rays,
Array< shared_ptr< Surfel >> &  results,
IntersectRayOptions  options = IntersectRayOptions(0),
const Array< float > &  coneBuffer = Array<float>() 
) const
inlineoverridevirtual

Values in results will be reused if already allocated, which can increase performance.

Reimplemented from G3D::TriTreeBase.

◆ intersectRays() [5/10]

virtual void G3D::VulkanTriTree::intersectRays ( const Array< Ray > &  rays,
Array< bool > &  results,
IntersectRayOptions  options = IntersectRayOptions(0) 
) const
inlineoverridevirtual
Parameters
booleanResultsThe red channel is nonzero on hit, 0 on miss. Subclasses are free to change the format of the booleanResults texture to whatever is most convenient for them, so make no assumptions other than that it has a red channel.

Reimplemented from G3D::TriTreeBase.

◆ intersectRays() [6/10]

virtual void G3D::VulkanTriTree::intersectRays ( const Array< Ray > &  rays,
Array< Hit > &  results,
IntersectRayOptions  options = IntersectRayOptions(0) 
) const
inlineoverridevirtual

Batch ray casting.

The default implementation calls the single-ray version using Thread::runConcurrently.

Reimplemented from G3D::TriTreeBase.

◆ intersectRays() [7/10]

virtual void G3D::VulkanTriTree::intersectRays ( const shared_ptr< GLPixelTransferBuffer > &  rayOrigin,
const shared_ptr< GLPixelTransferBuffer > &  rayDirection,
const shared_ptr< GLPixelTransferBuffer results[5],
IntersectRayOptions  options = IntersectRayOptions(0),
const shared_ptr< GLPixelTransferBuffer > &  rayCone = nullptr,
const int  baseMipLevel = 0,
const Vector2int32  wavefrontDimensions = Vector2int32(-1, -1),
const RenderMask  mask = 0xFF 
) const
inlineoverridevirtual
Parameters
rayOriginmust be RGBA32F() = XYZ, min distance
rayDirectionmust be RGBA32F() or RGBA16F() = normalized XYZ, max distance
rayConemust be null or a single-channel (R-only) texture. If not null, each element is the cosine of the half-angle of the cone about rayDirection that should be used to select a MIP-level at the intersection point. The easy way to compute this for primary rays is to pass the dot products of adjacent pixel ray directions.

The GBuffer and both textures must have the same dimensions.

Writes the following fields to the GLPixelTransferBuffers in order in the passed in array:

WS_NORMAL is zero at pixels where the ray misses

All other fields are ignored. The GBuffer may be reallocated with textures in a different format as well.

The base class implementation copies all data to the CPU, invokes the intersectRays overload that accepts CPU data, and then copies all data back to the GPU.

Reimplemented from G3D::TriTreeBase.

◆ intersectRays() [8/10]

virtual void G3D::VulkanTriTree::intersectRays ( const shared_ptr< GLPixelTransferBuffer > &  rayOrigin,
const shared_ptr< GLPixelTransferBuffer > &  rayDirection,
const shared_ptr< GLPixelTransferBuffer > &  booleanResults,
IntersectRayOptions  options = IntersectRayOptions(0) 
) const
inlineoverridevirtual
Parameters
booleanResultsThe red channel is nonzero on hit, 0 on miss. Subclasses are free to change the format of the booleanResults texture to whatever is most convenient for them, so make no assumptions other than that it has a red channel. This is the fastest overload for OptiXTriTree

Reimplemented from G3D::TriTreeBase.

◆ intersectRays() [9/10]

void G3D::VulkanTriTree::intersectRays ( const shared_ptr< Texture > &  rayOrigins,
const shared_ptr< Texture > &  rayDirections,
const shared_ptr< Texture > &  lambertian,
const shared_ptr< Texture > &  glossy,
const shared_ptr< Texture > &  emissive,
const shared_ptr< Texture > &  shadingNormal,
const shared_ptr< Texture > &  position 
) const

◆ intersectRays() [10/10]

virtual void G3D::VulkanTriTree::intersectRays ( const shared_ptr< Texture > &  rayOrigin,
const shared_ptr< Texture > &  rayDirection,
const shared_ptr< GBuffer > &  results,
IntersectRayOptions  options,
const shared_ptr< Texture > &  rayCone 
) const
overridevirtual
Deprecated:

Reimplemented from G3D::TriTreeBase.

◆ intersectSphere()

virtual void G3D::TriTreeBase::intersectSphere ( const Sphere sphere,
Array< Tri > &  triArray 
) const
overridevirtualinherited

Returns all triangles that intersect or are contained within the sphere (technically, this is a ball intersection).

Default implementation calls intersectBox and then filters the results for the sphere.

Implements G3D::TriTree.

Reimplemented in G3D::NativeTriTree.

◆ lastBuildTime()

RealTime G3D::TriTree::lastBuildTime ( ) const
inlineinherited

Time at which setContents() or rebuild() was last invoked.

◆ operator[]()

const Tri& G3D::TriTree::operator[] ( int  i) const
inlineinherited

Array access to the stored Tris.

◆ optixSupportsTexture()

static bool G3D::VulkanTriTree::optixSupportsTexture ( const shared_ptr< Texture > &  tex)
inlinestaticprotected

◆ rebuild()

virtual void G3D::VulkanTriTree::rebuild ( )
inlineoverridevirtual

Rebuild the tree after m_triArray or CPUVertexArray have been mutated.

Called automatically by setContents()

Implements G3D::TriTree.

◆ registerReallocationAndMapHooks()

void G3D::VulkanTriTree::registerReallocationAndMapHooks ( const shared_ptr< GLPixelTransferBuffer > &  t) const
protected

◆ sample()

void G3D::TriTree::sample ( const Hit hit,
shared_ptr< Surfel > &  surfel 
) const
inherited

◆ setContents() [1/4]

virtual void G3D::TriTreeBase::setContents ( const Array< shared_ptr< Surface >> &  surfaceArray,
ImageStorage  newImageStorage = ImageStorage::COPY_TO_CPU 
)
overridevirtualinherited

Base class implementation populates m_triArray and m_vertexArray and applies the image storage option.

Implements G3D::TriTree.

◆ setContents() [2/4]

virtual void G3D::TriTreeBase::setContents ( const shared_ptr< class Scene > &  scene,
ImageStorage  newStorage = ImageStorage::COPY_TO_CPU 
)
overridevirtualinherited

Implements G3D::TriTree.

◆ setContents() [3/4]

virtual void G3D::VulkanTriTree::setContents ( const Array< Tri > &  triArray,
const CPUVertexArray vertexArray,
ImageStorage  newStorage = ImageStorage::COPY_TO_CPU 
)
inlinevirtual

Reimplemented from G3D::TriTreeBase.

◆ setContents() [4/4]

virtual void G3D::VulkanTriTree::setContents ( const Array< shared_ptr< Surface > > &  surfaceArray,
ImageStorage  newStorage = ImageStorage::COPY_TO_CPU 
)
overridevirtual

◆ setTimingCallback()

void G3D::VulkanTriTree::setTimingCallback ( wave::TimingCallback callback,
int  verbosityLevel 
)

Set a timing function callback to print timing details from OptiX.

◆ signalVKSemaphore()

void G3D::VulkanTriTree::signalVKSemaphore ( const shared_ptr< Texture > &  tex) const
protected

◆ size()

int G3D::TriTree::size ( ) const
inlineinherited

◆ supported()

bool G3D::VulkanTriTree::supported ( )

If false after construction then VulkanTriTree will not work on this machine and you should switch to EmbreeTriTree.

This cannot be static because it has to try to construct an OptiX context.

◆ triArray() [1/2]

const Array<Tri>& G3D::TriTree::triArray ( ) const
inlineinherited

◆ triArray() [2/2]

Array<Tri>& G3D::TriTree::triArray ( )
inlineinherited

If you mutate this, you must call rebuild()

◆ vertexArray() [1/2]

const CPUVertexArray& G3D::TriTree::vertexArray ( ) const
inlineinherited

◆ vertexArray() [2/2]

CPUVertexArray& G3D::TriTree::vertexArray ( )
inlineinherited

If you mutate this, you must call rebuild()

◆ waitVKSemaphore()

void G3D::VulkanTriTree::waitVKSemaphore ( const shared_ptr< Texture > &  tex) const
protected

Member Data Documentation

◆ COHERENT_RAY_HINT

const IntersectRayOptions G3D::TriTree::COHERENT_RAY_HINT = 16
staticinherited

Make optimizations appropriate for coherent rays (same origin)

◆ debugConversionOverheadTime

RealTime G3D::TriTree::debugConversionOverheadTime = 0
mutableinherited

CPU timing of API conversion overhead for the most recent call to intersectRays.

◆ DO_NOT_CULL_BACKFACES

const IntersectRayOptions G3D::TriTree::DO_NOT_CULL_BACKFACES = 2
staticinherited

Do not allow the intersector to perform backface culling as an optimization.

Backface culling is not required in any case.

◆ glslangInitialized

bool G3D::VulkanTriTree::glslangInitialized = false
mutableprotected

◆ m_bvh

wave::VKBVH* G3D::VulkanTriTree::m_bvh
protected

Referenced by BVH().

◆ m_frameCache

CFrameCache G3D::VulkanTriTree::m_frameCache
mutableprotected

◆ m_ignoreTexture

shared_ptr<Texture> G3D::VulkanTriTree::m_ignoreTexture
protected

◆ m_interopTextureTable

Table<shared_ptr<Texture>, VKInteropHandles> G3D::VulkanTriTree::m_interopTextureTable
mutableprotected

◆ m_lastBuildTime

RealTime G3D::TriTree::m_lastBuildTime = -1e6
protectedinherited

◆ m_materialCache

Table<shared_ptr<Material>, MaterialIndex> G3D::VulkanTriTree::m_materialCache
mutableprotected

◆ m_nextFrameCacheID

int G3D::VulkanTriTree::m_nextFrameCacheID = 0
mutableprotected

◆ m_outHeight

int G3D::VulkanTriTree::m_outHeight = -1
mutableprotected

◆ m_outPBOArray

Array<shared_ptr<GLPixelTransferBuffer> > G3D::VulkanTriTree::m_outPBOArray
mutableprotected

◆ m_outWidth

int G3D::VulkanTriTree::m_outWidth = -1
mutableprotected

◆ m_rayDirections

shared_ptr<GLPixelTransferBuffer> G3D::VulkanTriTree::m_rayDirections
mutableprotected

◆ m_rayOrigins

shared_ptr<GLPixelTransferBuffer> G3D::VulkanTriTree::m_rayOrigins
mutableprotected

◆ m_registeredBufferIDs

Table<int, weak_ptr<GLPixelTransferBuffer> > G3D::VulkanTriTree::m_registeredBufferIDs
mutableprotected

◆ m_sky

shared_ptr<CubeMap> G3D::TriTree::m_sky
protectedinherited

◆ m_surfaceCache

SurfaceCache G3D::VulkanTriTree::m_surfaceCache
mutableprotected

◆ m_textureCache

Table<GLuint, shared_ptr<Texture> > G3D::VulkanTriTree::m_textureCache
protected

◆ m_triArray

Array<Tri> G3D::TriTree::m_triArray
protectedinherited

◆ m_vertexArray

CPUVertexArray G3D::TriTree::m_vertexArray
protectedinherited

◆ m_vertexCache

VertexCache G3D::VulkanTriTree::m_vertexCache
mutableprotected

◆ NO_PARTIAL_COVERAGE_TEST

const IntersectRayOptions G3D::TriTree::NO_PARTIAL_COVERAGE_TEST = 8
staticinherited

Disable partial coverage (alpha) testing.

◆ OCCLUSION_TEST_ONLY

const IntersectRayOptions G3D::TriTree::OCCLUSION_TEST_ONLY = 1
staticinherited

Test for occlusion and do not necessarily return valid triIndex, backfacing, etc.

data (useful for shadow rays and testing line of sight)

◆ PARTIAL_COVERAGE_THRESHOLD_ZERO

const IntersectRayOptions G3D::TriTree::PARTIAL_COVERAGE_THRESHOLD_ZERO = 4
staticinherited

Only fail the partial coverage (alpha) test on zero coverage.


documentation generated on Wed Nov 24 2021 08:02:02 using doxygen 1.8.15