mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
VideoCommon: add cubemap as a sampler target for shaders, add cubemap as a valid texture asset
This commit is contained in:
parent
9419d92446
commit
589834f562
4 changed files with 17 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue