![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "Shader.h"#include "Misc/CoreMisc.h"#include "Misc/StringBuilder.h"#include "VertexFactory.h"#include "ProfilingDebugging/DiagnosticTable.h"#include "Interfaces/ITargetPlatform.h"#include "Interfaces/ITargetPlatformManagerModule.h"#include "Interfaces/IShaderFormat.h"#include "Internationalization/Regex.h"#include "Serialization/ShaderKeyGenerator.h"#include "ShaderCodeLibrary.h"#include "ShaderCore.h"#include "ShaderCompilerCore.h"#include "RenderUtils.h"#include "StereoRenderUtils.h"#include "Misc/ConfigCacheIni.h"#include "Misc/ScopeLock.h"#include "UObject/RenderingObjectVersion.h"#include "ProfilingDebugging/LoadTimeTracker.h"#include "Misc/LargeWorldRenderPosition.h"#include "DataDrivenShaderPlatformInfo.h"#include "ShaderPlatformCachedIniValue.h"#include "ColorManagement/ColorSpace.h"| DEFINE_LOG_CATEGORY | ( | LogShaders | ) |
| void DispatchComputeShader | ( | FRHIComputeCommandList & | RHICmdList, |
| FShader * | Shader, | ||
| uint32 | ThreadGroupCountX, | ||
| uint32 | ThreadGroupCountY, | ||
| uint32 | ThreadGroupCountZ | ||
| ) |
Helper function to dispatch a compute shader while checking that parameters have been set correctly.
| void DispatchIndirectComputeShader | ( | FRHIComputeCommandList & | RHICmdList, |
| FShader * | Shader, | ||
| FRHIBuffer * | ArgumentBuffer, | ||
| uint32 | ArgumentOffset | ||
| ) |
Helper function to dispatch a compute shader indirectly while checking that parameters have been set correctly.
| void DumpShaderPipelineStats | ( | EShaderPlatform | Platform | ) |
Dumps shader pipeline stats to the log. Does not include material (eg shader pipeline instance) information.
| Platform | - Platform to dump shader info for, use SP_NumPlatforms for all |
| void DumpShaderStats | ( | EShaderPlatform | Platform, |
| EShaderFrequency | Frequency | ||
| ) |
Dumps shader stats to the log. Will also print some shader pipeline information.
| Platform | - Platform to dump shader info for, use SP_NumPlatforms for all |
| Frequency | - Whether to dump PS or VS info, use SF_NumFrequencies to dump both |
|
inline |
Find the shader pipeline type with the given name.
| FShaderType * FindShaderTypeByName | ( | const FHashedName & | ShaderTypeName | ) |
Finds the shader type with a given name.
| ShaderTypeName | - The name of the shader type to find. |
| uint32 GetRayTracingPayloadTypeMaxSize | ( | ERayTracingPayloadType | PayloadType | ) |
| EShaderPermutationFlags GetShaderPermutationFlags | ( | const FPlatformTypeLayoutParameters & | LayoutParams | ) |
Get the shader permutation flags associated with a platform layout.
| const FTypeLayoutDesc & GetTypeLayoutDesc | ( | const FPointerTableBase * | PtrTable, |
| const FShader & | Shader | ||
| ) |
| IMPLEMENT_EXPORTED_INTRINSIC_TYPE_LAYOUT | ( | TIndexedPtr< FShaderType > | ) |
| IMPLEMENT_EXPORTED_INTRINSIC_TYPE_LAYOUT | ( | TIndexedPtr< FVertexFactoryType > | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShader | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderLooseParameterBufferInfo | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderLooseParameterInfo | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderMapContent | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderParameterBindings | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderParameterMapInfo | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderPipeline | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderResourceParameterInfo | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderTypeDependency | ) |
| IMPLEMENT_TYPE_LAYOUT | ( | FShaderUniformBufferParameterInfo | ) |
| bool IsDxcEnabledForPlatform | ( | EShaderPlatform | Platform, |
| bool | bHlslVersion2021 = false |
||
| ) |
Returns whether DirectXShaderCompiler (DXC) is enabled for the specified shader platform. See console variables "r.OpenGL.ForceDXC", "r.D3D.ForceDXC".
| bool IsUsingEmulatedUniformBuffers | ( | EShaderPlatform | Platform | ) |
Returns whether the platform is using emulated uniform buffers
| FArchive & operator<< | ( | FArchive & | Ar, |
| const FShaderPipelineType *& | TypeRef | ||
| ) |
Serializes a reference to a shader pipeline type.
| FArchive & operator<< | ( | FArchive & | Ar, |
| FShaderType *& | Ref | ||
| ) |
Serializes a shader type reference by name.
| void RegisterRayTracingPayloadType | ( | ERayTracingPayloadType | PayloadType, |
| uint32 | PayloadSize, | ||
| TRaytracingPayloadSizeFunction | PayloadSizeFunction | ||
| ) |
| void SetAdditionalShaderPermutationFlags | ( | EShaderPermutationFlags | AdditionalFlags | ) |
Set global additional flags that are always added in GetShaderPermutationFlags(). Expected to be called once at startup.
| void ShaderMapAppendKey | ( | EShaderPlatform | Platform, |
| FShaderKeyGenerator & | KeyGen | ||
| ) |
| void ShaderMapAppendKeyString | ( | EShaderPlatform | Platform, |
| FString & | KeyString | ||
| ) |
Appends to KeyString for all shaders.