Fix build regression from 6f7f22eb47
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "Engine/ContentImporters/AssetsImportingManager.h"
|
||||
#include "Engine/Platform/FileSystemWatcher.h"
|
||||
#include "Engine/Platform/FileSystem.h"
|
||||
#include "Engine/Platform/File.h"
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Editor/Editor.h"
|
||||
#include "Editor/ProjectInfo.h"
|
||||
#endif
|
||||
@@ -145,6 +147,7 @@ bool ShadersCompilation::Compile(ShaderCompilationOptions& options)
|
||||
|
||||
if (result)
|
||||
{
|
||||
#if USE_EDITOR
|
||||
// Output shader source to easily investigate errors (eg. for generated shaders like materials or particles)
|
||||
const String outputSourceFolder = Globals::ProjectCacheFolder / TEXT("/Shaders/Source");
|
||||
const String outputSourcePath = outputSourceFolder / options.TargetName + TEXT(".hlsl");
|
||||
@@ -153,6 +156,7 @@ bool ShadersCompilation::Compile(ShaderCompilationOptions& options)
|
||||
File::WriteAllBytes(outputSourcePath, (const byte*)options.Source, options.SourceLength);
|
||||
LOG(Error, "Shader compilation '{0}' failed (profile: {1})", options.TargetName, ::ToString(options.Profile));
|
||||
LOG(Error, "Source: {0}", outputSourcePath);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user