google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.98k stars 1.22k forks source link

Feature Request: Support for Vulkan (VK_KHR_external_memory) #258

Open DerRM opened 6 years ago

DerRM commented 6 years ago

Are there any plans to support VK_KHR_external_memory or something similar with ArSession_setCameraTextureName? It would be great to use Vulkan as a render backend but as far as I understood you only can either use GLES or Vulkan for the same surface you render to.

inio commented 6 years ago

While VK_KHR_external_memory solves half the problem, at the moment Android has no equivalent to SurfaceTexture that works with Vulkan.

DerRM commented 6 years ago

Are there any plans for supporting a Vulkan enabled SurfaceTexture in a future Android release?

tweenk commented 6 years ago

I'm not on the AR team, but can answer the question. Internally, SurfaceTexture is a mutable texture: the same texture ID is used in multiple calls to glEGLImageTargetTexture2DOES to point the texture at different native buffers (gralloc buffers). Mutable textures do not exist in Vulkan and therefore it's not possible to add Vulkan support to SurfaceTexture. The Vulkan-compatible equivalent of SurfaceTexture is AImageReader, but using it with camera frames requires Vulkan 1.1 and the extension VK_ANDROID_external_memory_android_hardware_buffer, which is not supported by any GPU drivers yet.

inio commented 6 years ago

@tweenk Thanks for the info!

kidapu commented 4 years ago

I want to use ARCore with Vulkan, too. Any updates?

laim2003 commented 3 years ago

Any updates on this?

devbridie commented 3 years ago

No updates on this so far, sorry.

uprealdigital commented 3 years ago

Can't believe this is still an issue! I need Vulcan with Unity AR foundation for performance reasons! I hope Google supports Vulcan soon!

blasco commented 3 years ago

Same situation here, any news?

ROBYER1 commented 2 years ago

2 years have passed, just a little update to say why it's still not supported would be nice :)

sam1am commented 2 years ago

Is this ever going to happen? I'm finding this to be very limiting. It has been 4 years.

smitdylan2001 commented 2 years ago

Still waiting for vulkan. It is now one of the standard render APIs, it is the default in Unity now (where a lot of AR apps/games are made) and it hinders some features in Unity (such as VFX graph)

rtrn1337 commented 2 years ago

Same here! We need Vulkan support!

nara6500 commented 2 years ago

We also need Vulkan support! Particle System instead of VFX graph is NOT a high end solution in Unity!

speedym commented 2 years ago

It would be great if ArCore could have Vulkan support. Please consider adding it.

axilesoft commented 2 years ago

Any way to share the texture now?

olokobayusuf commented 1 year ago

Let me be the first voice calling for this in 2023. Happy New Year 🎊

ptc-rgrasset commented 1 year ago

Is there any update on that ?

The comment from @tweenk in 2018, referred to Vulkan 1.1 requirement is now fully addressed in 2023, as there is 77% of Android devices now supporting this version: https://developer.android.com/about/dashboards

The fact that all Unity apps using ARCore/ARFoundation have been limited for so many years on using an API which is getting old, not improved anymore is concerning, and really limit what can be done in term of quality/delivery on the app side.

ptc-rgrasset commented 1 year ago

Glad to see that finally added in 1.37 !