2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Core.h"
|
|
|
|
|
#include "ShaderCore.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Preprocess a shader.
|
|
|
|
|
* @param OutPreprocessedShader - Upon return contains the preprocessed source code.
|
|
|
|
|
* @param ShaderOutput - ShaderOutput to which errors can be added.
|
|
|
|
|
* @param ShaderInput - The shader compiler input.
|
|
|
|
|
* @param AdditionalDefines - Additional defines with which to preprocess the shader.
|
|
|
|
|
* @returns true if the shader is preprocessed without error.
|
|
|
|
|
*/
|
|
|
|
|
extern SHADERPREPROCESSOR_API bool PreprocessShader(
|
|
|
|
|
FString& OutPreprocessedShader,
|
|
|
|
|
FShaderCompilerOutput& ShaderOutput,
|
|
|
|
|
const FShaderCompilerInput& ShaderInput,
|
|
|
|
|
const FShaderCompilerDefinitions& AdditionalDefines
|
|
|
|
|
);
|
2014-11-21 12:21:29 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Preprocess a shader file, for non-usf files.
|
|
|
|
|
* @param OutPreprocessedShader - Upon return contains the preprocessed source code.
|
|
|
|
|
* @param ShaderOutput - ShaderOutput to which errors can be added.
|
|
|
|
|
* @param ShaderInput - The shader compiler input.
|
|
|
|
|
* @returns true if the shader is preprocessed without error.
|
|
|
|
|
*/
|
|
|
|
|
extern SHADERPREPROCESSOR_API bool PreprocessShaderFile(
|
|
|
|
|
FString& OutPreprocessedShader,
|
|
|
|
|
TArray<FShaderCompilerError>& OutShaderErrors,
|
|
|
|
|
const FString& InShaderFile
|
|
|
|
|
);
|