HgiShaderFunctionTextureDesc Struct Reference

Describes a texture to be passed into a shader. More...

Public Attributes

std::string nameInShader
 
uint32_t dimensions
 
HgiFormat format
 
HgiShaderTextureType textureType
 
uint32_t bindIndex
 
size_t arraySize
 
bool writable
 

Detailed Description

Describes a texture to be passed into a shader.

  • nameInShader: The name written from the codegen into shader file for the texture.
  • dimensions: 1d, 2d or 3d texture declaration.
  • format Format of the texture. This is required in APIs where sampler types depend on the texture (e.g., GL)
  • textureType: Type of the texture (e.g. array texture, shadow, etc.).
  • bindIndex: The index of the resource.
  • arraySize: If arraySize > 0, indicates the size of the array. Note that textureType = HgiTextureTypeTexture and arraySize = 2 would create an array with two textures whereas textureType = HgiTextureTypeArrayTexture and arraySize = 0 would create a single array texture (arrays of array textures are supported as well).
  • writable Whether the texture is writable.

Definition at line 65 of file shaderFunctionDesc.h.


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