Loading...
Searching...
No Matches
HgiShaderFunctionTextureDesc Struct Reference

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

#include <shaderFunctionDesc.h>

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.

Member Data Documentation

◆ arraySize

size_t arraySize

Definition at line 75 of file shaderFunctionDesc.h.

◆ bindIndex

uint32_t bindIndex

Definition at line 74 of file shaderFunctionDesc.h.

◆ dimensions

uint32_t dimensions

Definition at line 71 of file shaderFunctionDesc.h.

◆ format

HgiFormat format

Definition at line 72 of file shaderFunctionDesc.h.

◆ nameInShader

std::string nameInShader

Definition at line 70 of file shaderFunctionDesc.h.

◆ textureType

HgiShaderTextureType textureType

Definition at line 73 of file shaderFunctionDesc.h.

◆ writable

bool writable

Definition at line 76 of file shaderFunctionDesc.h.


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