UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShaderParameterMap Class Reference

#include <ShaderCore.h>

Public Member Functions

 FShaderParameterMap ()
 
RENDERCORE_API TOptional< FParameterAllocationFindParameterAllocation (FStringView ParameterName) const
 
RENDERCORE_API TOptional< FParameterAllocationFindAndRemoveParameterAllocation (FStringView ParameterName)
 
RENDERCORE_API bool FindParameterAllocation (FStringView ParameterName, uint16 &OutBufferIndex, uint16 &OutBaseIndex, uint16 &OutSize) const
 
RENDERCORE_API bool ContainsParameterAllocation (FStringView ParameterName) const
 
RENDERCORE_API void AddParameterAllocation (FStringView ParameterName, uint16 BufferIndex, uint16 BaseIndex, uint16 Size, EShaderParameterType ParameterType)
 
RENDERCORE_API void RemoveParameterAllocation (FStringView ParameterName)
 
RENDERCORE_API TArray< FStringViewGetAllParameterNamesOfType (EShaderParameterType InType) const
 
RENDERCORE_API uint32 CountParametersOfType (EShaderParameterType InType) const
 
RENDERCORE_API void VerifyBindingsAreComplete (const TCHAR *ShaderTypeName, FShaderTarget Target, const class FVertexFactoryType *InVertexFactoryType) const
 
void UpdateHash (FSHA1 &HashState) const
 
void GetAllParameterNames (TArray< FString > &OutNames) const
 
const TMap< FString, FParameterAllocation > & GetParameterMap () const
 

Public Attributes

TMap< FString, FParameterAllocationParameterMap
 

Friends

FArchiveoperator<< (FArchive &Ar, FShaderParameterMap &InParameterMap)
 

Detailed Description

A map of shader parameter names to registers allocated to that parameter.

Constructor & Destructor Documentation

◆ FShaderParameterMap()

FShaderParameterMap::FShaderParameterMap ( )
inline

Member Function Documentation

◆ AddParameterAllocation()

void FShaderParameterMap::AddParameterAllocation ( FStringView  ParameterName,
uint16  BufferIndex,
uint16  BaseIndex,
uint16  Size,
EShaderParameterType  ParameterType 
)

◆ ContainsParameterAllocation()

bool FShaderParameterMap::ContainsParameterAllocation ( FStringView  ParameterName) const

◆ CountParametersOfType()

uint32 FShaderParameterMap::CountParametersOfType ( EShaderParameterType  InType) const

Returns a count of all parameters of the given type.

◆ FindAndRemoveParameterAllocation()

TOptional< FParameterAllocation > FShaderParameterMap::FindAndRemoveParameterAllocation ( FStringView  ParameterName)

◆ FindParameterAllocation() [1/2]

TOptional< FParameterAllocation > FShaderParameterMap::FindParameterAllocation ( FStringView  ParameterName) const

◆ FindParameterAllocation() [2/2]

bool FShaderParameterMap::FindParameterAllocation ( FStringView  ParameterName,
uint16 OutBufferIndex,
uint16 OutBaseIndex,
uint16 OutSize 
) const

◆ GetAllParameterNames()

void FShaderParameterMap::GetAllParameterNames ( TArray< FString > &  OutNames) const
inline

◆ GetAllParameterNamesOfType()

TArray< FStringView > FShaderParameterMap::GetAllParameterNamesOfType ( EShaderParameterType  InType) const

Returns an array of all parameters with the given type.

◆ GetParameterMap()

const TMap< FString, FParameterAllocation > & FShaderParameterMap::GetParameterMap ( ) const
inline

◆ RemoveParameterAllocation()

void FShaderParameterMap::RemoveParameterAllocation ( FStringView  ParameterName)

◆ UpdateHash()

void FShaderParameterMap::UpdateHash ( FSHA1 HashState) const

Updates the hash state with the contents of this parameter map.

◆ VerifyBindingsAreComplete()

void FShaderParameterMap::VerifyBindingsAreComplete ( const TCHAR ShaderTypeName,
FShaderTarget  Target,
const class FVertexFactoryType InVertexFactoryType 
) const

Checks that all parameters are bound and asserts if any aren't in a debug build

Parameters
InVertexFactoryTypecan be 0

Friends And Related Symbol Documentation

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FShaderParameterMap InParameterMap 
)
friend

Member Data Documentation

◆ ParameterMap

TMap<FString,FParameterAllocation> FShaderParameterMap::ParameterMap

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