summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem/Runtime
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-10-15 16:34:06 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2023-12-04 00:12:31 -0600
commite204b3c8ee46653ca1c9d2aea6877ec3d11f7472 (patch)
treebbaa0f192c4e72843b06f45563fc930e7e2395c3 /Source/Core/VideoCommon/GraphicsModSystem/Runtime
parent96c256f97ad2729431380172d619fc2567b3341e (diff)
VideoCommon: add additional data types (int, int2, float, bool, etc) as properties of materials and some helper functions to support sending the data to the GPU
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime')
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
index 267f88bb4c..0a51bb995e 100644
--- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/Actions/CustomPipelineAction.cpp
@@ -393,21 +393,15 @@ void CustomPipelineAction::OnTextureCreate(GraphicsModActionData::TextureCreate*
return;
}
- if (property.m_type == VideoCommon::MaterialProperty::Type::Type_TextureAsset)
+ if (auto* value = std::get_if<std::string>(&property.m_value))
{
- if (property.m_value)
+ auto asset = loader.LoadGameTexture(*value, m_library);
+ if (asset)
{
- if (auto* value = std::get_if<std::string>(&*property.m_value))
- {
- auto asset = loader.LoadGameTexture(*value, m_library);
- if (asset)
- {
- const auto loaded_time = asset->GetLastLoadedTime();
- game_assets.push_back(VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{
- std::move(asset), loaded_time});
- m_texture_code_names.push_back(property.m_code_name);
- }
- }
+ const auto loaded_time = asset->GetLastLoadedTime();
+ game_assets.push_back(
+ VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{std::move(asset), loaded_time});
+ m_texture_code_names.push_back(property.m_code_name);
}
}
}