UMaterialInstance::CacheResourceShadersForCooking

Cache resource shaders for rendering on the given shader platform.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Materials/MaterialInstance.h

Include

#include "Materials/MaterialInstance.h"

Source

/Engine/Source/Runtime/Engine/Private/Materials/MaterialInstance.cpp

Syntax

void CacheResourceShadersForCooking
(
    EShaderPlatform ShaderPlatform,
    TArray< FMaterialResource * > & OutCachedMaterialResources,
    EMaterialShaderPrecompileMode PrecompileMode,
    const ITargetPlatform * TargetPlatform
)

Remarks

Cache resource shaders for rendering on the given shader platform. If a matching shader map is not found in memory or the DDC, a new one will be compiled. The results will be applied to this FMaterial in the renderer when they are finished compiling.

This modifies material variables used for rendering and is assumed to be called within a FMaterialUpdateContext!

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss