diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-09-05 21:11:19 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-09-05 21:11:19 -0500 |
| commit | 589834f56229edc217d9f2bc1805961cabde9028 (patch) | |
| tree | 7d5c959e68301a1b5a4de4f52db8a911f35796ff /Source/Core/VideoCommon/Assets/TextureAsset.cpp | |
| parent | 9419d92446f4bb47c2192dc0bd3da7c23c611a4f (diff) | |
VideoCommon: add cubemap as a sampler target for shaders, add cubemap as a valid texture asset
Diffstat (limited to 'Source/Core/VideoCommon/Assets/TextureAsset.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/TextureAsset.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Assets/TextureAsset.cpp b/Source/Core/VideoCommon/Assets/TextureAsset.cpp index 8df36397e8..8cd92aa89f 100644 --- a/Source/Core/VideoCommon/Assets/TextureAsset.cpp +++ b/Source/Core/VideoCommon/Assets/TextureAsset.cpp @@ -136,6 +136,15 @@ bool TextureData::FromJson(const CustomAssetLibrary::AssetID& asset_id, if (type == "texture2d") { data->m_type = TextureData::Type::Type_Texture2D; + + if (!ParseSampler(asset_id, json, &data->m_sampler)) + { + return false; + } + } + else if (type == "texturecube") + { + data->m_type = TextureData::Type::Type_TextureCube; } else { @@ -146,11 +155,6 @@ bool TextureData::FromJson(const CustomAssetLibrary::AssetID& asset_id, return false; } - if (!ParseSampler(asset_id, json, &data->m_sampler)) - { - return false; - } - return true; } |
