/Engine/Source/Developer/TargetPlatform/Public/Interfaces/IShaderFormat.h
Predicate which should return true if a second preprocess & compilation is required given the initial preprocess output. Only called if SupportsIndependentPreprocessing returns true. This is generally be determined by analyzing the directives on the given preprocess output (which are set by the presence of UESHADERMETADATA directives in the original source), though other conditions are possible and up to the implementation. In the event this returns true, PreprocessShader will be called an additional time, with the bIsSecondary field on theFShaderPreprocessOutputset to true, and the overload of CompilePreprocessedShader taking twoFShaderPreprocessOutputand twoFShaderCompilerOutputobjects will be called instead of the single object variants. Note that this is done instead of calling the single object variant twice so shader formats can statically distinguish primary compilation in a dual-compile case from the single-compile case.
virtual bool RequiresSecondaryCompile ( const [FShaderCompilerInput](API\Runtime\RenderCore\FShaderCompilerInput) & Input, const [FShaderCompilerEnvironment](API\Runtime\RenderCore\FShaderCompilerEnvironment) & Environment, const [FShaderPreprocessOutput](API\Runtime\RenderCore\FShaderPreprocessOutput) & PreprocessOutput ) const