Skip to content

Commit

Permalink
Merge pull request #12139 from iwubcode/more_shader_texture_properties
Browse files Browse the repository at this point in the history
VideoCommon: add additional texture sampler types to ShaderAsset
  • Loading branch information
JMC47 committed Sep 5, 2023
2 parents 82ea4f4 + f982c55 commit 9419d92
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Core/VideoCommon/Assets/ShaderAsset.cpp
Expand Up @@ -49,6 +49,14 @@ bool ParseShaderProperties(const VideoCommon::CustomAssetLibrary::AssetID& asset
{
property.m_type = ShaderProperty::Type::Type_Sampler2D;
}
else if (type == "samplerarrayshared_main")
{
property.m_type = ShaderProperty::Type::Type_SamplerArrayShared_Main;
}
else if (type == "samplerarrayshared_additional")
{
property.m_type = ShaderProperty::Type::Type_SamplerArrayShared_Additional;
}
else
{
ERROR_LOG_FMT(VIDEO,
Expand Down
8 changes: 8 additions & 0 deletions Source/Core/VideoCommon/Assets/ShaderAsset.h
Expand Up @@ -14,9 +14,17 @@ namespace VideoCommon
{
struct ShaderProperty
{
// "SamplerShared" denotes that the sampler
// already exists outside of the shader source
// (ex: in the Dolphin defined pixel shader)
// "Main" is the first entry in a shared sampler array
// and "Additional" denotes a subsequent entry
// in the array
enum class Type
{
Type_Undefined,
Type_SamplerArrayShared_Main,
Type_SamplerArrayShared_Additional,
Type_Sampler2D,
Type_Max = Type_Sampler2D
};
Expand Down

0 comments on commit 9419d92

Please sign in to comment.