All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
D3D11PtexTexture Class Reference

#include <d3d11PtexTexture.h>

Inheritance diagram for D3D11PtexTexture:
NonCopyable< D3D11PtexTexture >

Public Member Functions

ID3D11Buffer * GetPagesTextureBuffer () const
 
ID3D11Buffer * GetLayoutTextureBuffer () const
 
ID3D11Texture2D * GetTexelsTexture () const
 Returns the texels texture array. More...
 
 ~D3D11PtexTexture ()
 

Static Public Member Functions

static D3D11PtexTextureCreate (ID3D11DeviceContext *deviceContext, PtexTexture *reader, unsigned long int targetMemory=0, int gutterWidth=0, int pageMargin=0)
 

Additional Inherited Members

Detailed Description

D3D11PtexTexture : implements simple support for ptex textures

The current implementation declares _texels as a TEXTURE2D_ARRAY of n pages of a resolution that matches that of the largest face in the PTex file.

Two TEXTURE_BUFFER constructs are used as lookup tables :

  • _pages stores the array index in which a given face is located
  • _layout stores 4 float coordinates : top-left corner and width/height for each face

GLSL fragments use SV_PrimitiveID and SV_DomainLocation to access the _pages and _layout indirection tables, which provide then texture coordinates for the texels stored in the _texels texture array.

Hbr provides per-face support for a ptex face indexing scheme. D3D11DrawContext class provides ptex face index lookup table as a texture buffer object that can be accessed by HLSL shaders.

Definition at line 61 of file d3d11PtexTexture.h.

Constructor & Destructor Documentation

Member Function Documentation

static D3D11PtexTexture* Create ( ID3D11DeviceContext *  deviceContext,
PtexTexture *  reader,
unsigned long int  targetMemory = 0,
int  gutterWidth = 0,
int  pageMargin = 0 
)
static
ID3D11Buffer* GetLayoutTextureBuffer ( ) const
inline

Returns the texture buffer containing the layout of the ptex faces in the texels texture array.

Definition at line 75 of file d3d11PtexTexture.h.

ID3D11Buffer* GetPagesTextureBuffer ( ) const
inline

Returns the texture buffer containing the lookup table associate each ptex face index with its 3D texture page in the texels texture array.

Definition at line 71 of file d3d11PtexTexture.h.

ID3D11Texture2D* GetTexelsTexture ( ) const
inline

Returns the texels texture array.

Definition at line 78 of file d3d11PtexTexture.h.


The documentation for this class was generated from the following file: