Add GPU Texture binding as Gameplay Global texture for runtime-textures

This commit is contained in:
2026-06-23 08:42:55 +02:00
parent 396f412f87
commit 5636c9d85b
@@ -478,6 +478,13 @@ void MaterialParameter::Bind(BindMeta& meta) const
meta.Context->BindSR(_registerIndex, texture ? texture->GetTexture() : nullptr);
break;
}
case VariantType::Object:
{
// GPU Texture bind must match dimensions of the value archetype (eg. 2d or cube texture)
auto gpuTexture = Cast<GPUTexture>(e->Value.AsObject);
meta.Context->BindSR(_registerIndex, gpuTexture);
break;
}
default:
#if !BUILD_RELEASE
LOG(Warning, "Invalid Gameplay Global '{}' ({}) value type '{}' to bind to material", _name, _asAsset->GetPath(), e->Value.Type.ToString());