Add GPU Texture binding as Gameplay Global texture for runtime-textures
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user