#pragma once

#include "ShaderTypes.h"
#include "FontAtlasBuilder.h"

#include <map>
#include <memory>
#include <string>
#include <vector>

struct RuntimeShaderPassArtifact
{
	std::string passId;
	std::string fragmentShaderSource;
	std::vector<std::string> inputNames;
	std::string outputName;
};

struct RuntimeTextTextureMetrics
{
	float activeWidthScale = 1.0f;
	float aspect = 1.0f;
};

struct RuntimePreparedTextTexture
{
	std::string parameterId;
	std::string textValue;
	unsigned width = 0;
	unsigned height = 0;
	unsigned liveWidth = 1;
	std::shared_ptr<const std::vector<unsigned char>> rgbaPixels;
};

struct RuntimeShaderArtifact
{
	std::string layerId;
	std::string shaderId;
	std::string packageFingerprint;
	std::string displayName;
	std::string fragmentShaderSource;
	std::vector<RuntimeShaderPassArtifact> passes;
	std::string message;
	std::vector<ShaderParameterDefinition> parameterDefinitions;
	std::map<std::string, ShaderParameterValue> parameterValues;
	std::map<std::string, RuntimeTextTextureMetrics> textTextureMetrics;
	std::vector<RuntimePreparedTextTexture> preparedTextTextures;
	std::vector<RenderCadenceCompositor::FontAtlasBuildOutput> fontAtlases;
};
