VideoCommon: add a method to calculate a default value for ShaderAsset and another to list its types

This commit is contained in:
iwubcode
2024-01-23 01:07:42 -06:00
parent b5a6225e1a
commit a40a952177
2 changed files with 74 additions and 0 deletions

View File

@ -5,7 +5,9 @@
#include <array>
#include <map>
#include <span>
#include <string>
#include <string_view>
#include <variant>
#include <picojson.h>
@ -44,6 +46,8 @@ struct ShaderProperty
using Value = std::variant<s32, std::array<s32, 2>, std::array<s32, 3>, std::array<s32, 4>, float,
std::array<float, 2>, std::array<float, 3>, std::array<float, 4>, bool,
RGB, RGBA, Sampler2D, Sampler2DArray, SamplerCube>;
static std::span<const std::string_view> GetValueTypeNames();
static Value GetDefaultValueFromTypeName(std::string_view name);
Value m_default;
std::string m_description;