Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UMaterial
Description
Cache resource shaders for cooking on the given shader platform. If a matching shader map is not found in memory or the DDC, a new one will be compiled. This does not apply completed results to the renderer scenes. Caller is responsible for deleting OutCachedMaterialResources. Note: This modifies material variables used for rendering and is assumed to be called within a FMaterialUpdateContext!
| Name | CacheResourceShadersForCooking |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/Material.h |
| Include Path | #include "Materials/Material.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Materials/Material.cpp |
void CacheResourceShadersForCooking
(
EShaderPlatform Platform,
TArray < FMaterialResourceForCooking > & OutCachedMaterialResources,
const ITargetPlatform * TargetPlatform,
bool bBlocking
)