"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

SetLegacyRenderingEnabledCondition

Can someone from PTC/Vuforia shed some light on the new VuforiaRenderer.SetLegacyRenderingEnabledCondition API that was introduced in Vuforia 8.1.7?

The only place I see it referenced is in the latest OcclusionManagement sample where it's used like this:

void Awake() { VuforiaRenderer.Instance.SetLegacyRenderingEnabledCondition(()=>true); //Currently post processing effects using the video background texture are only supported by legacy rendering }

In my app, I assign the video background texture to a Unity Projector. However, as of Vuforia 8.1.7, VuforiaRenderer.Instance.VideoBackgroundTexture is always null unless I enable "legacy rendering" like in the Awake() code above.

Will there be a new way to get the video background texture either as a texture or a material in future versions of Vuforia? If not, will the now "legacy" feature I rely on be dropped at some point?

Thanks, Adam

Charriu84

Fri, 03/29/2019 - 15:32

I'm also interested in this topic. I recently updated to Vuforia 8.1.7 and I get this error message:

RendererApiNotSupportedException: The renderer API OpenGLCore is not supported. Video background rendering is not possible.

My screen also stays black.

Hello,

Suggest you grab the texture from the Unity Background Plane material:

var cam = DigitalEyewearARController.Instance.PrimaryCamera;
var videoBg = cam.GetComponentInChildren<BackgroundPlaneBehaviour>();
if (!videoBg)
   return;

Rilissimo

Fri, 04/12/2019 - 14:24

In reply to by medabit

Ok so, some problems regarding the latest Vuforia versions.


VuforiaRenderer.Instance.VideoBackgroundTexture is always null

To get it that way you need to do this:

VuforiaRenderer.Instance.SetLegacyRenderingEnabledCondition(()=>true)

Hello,

We're tracking the following issue with SDK 8.1.7: https://developer.vuforia.com/forum/unity/bug-accessing-background-plane-texture-bug

Thanks,

Vuforia Engine Support

Hello,

Please refer to the following for a workaround solution: https://developer.vuforia.com/forum/unity/suggested-workaround-when-accessing-unity-materials-interferes-background-texture-updates

Thanks,

Vuforia Engine Support