// Copyright (c) Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Core/Types/String.h"
#include "Engine/Core/Types/Guid.h"
#include "Engine/Core/Collections/Array.h"
#include "Engine/Graphics/Shaders/Config.h"
class MemoryWriteStream;
///
/// Shader compilation options container
///
struct FLAXENGINE_API ShaderCompilationOptions
{
public:
///
/// Name of the target object (name of the shader or material for better logging readability)
///
String TargetName;
///
/// Unique ID of the target object
///
Guid TargetID = Guid::Empty;
///
/// Shader source code (null terminated)
///
const char* Source = nullptr;
///
/// Shader source code length
///
uint32 SourceLength = 0;
public:
///
/// Target shader profile
///
ShaderProfile Profile = ShaderProfile::Unknown;
///
/// Disables shaders compiler optimizations. Can be used to debug shaders on a target platform or to speed up the shaders compilation time.
///
bool NoOptimize = false;
///
/// Enables shader debug data generation (depends on the target platform rendering backend).
///
bool GenerateDebugData = false;
///
/// Enable/disable promoting warnings to compilation errors
///
bool TreatWarningsAsErrors = false;
///
/// Custom macros for the shader compilation
///
Array Macros;
public:
///
/// Output stream to write compiled shader cache to
///
MemoryWriteStream* Output = nullptr;
};