artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
41 stars 22 forks source link

Re-implement native texture support for BGRA textures on Windows, Linux. #29

Open OptrixAU opened 4 years ago

OptrixAU commented 4 years ago

While it's ALWAYS crashed the iOS version, I've found that Native GL Texturing is causing crashes in the Android build now.

I've noticed that performance seems quite a bit better without the option anyway, so Native Texturing seems a little less necessary right now. Still, since it's an available option, I thought it'd be best to check.

philip-lamb commented 4 years ago

Native texturing is not supported in arunityx at present. The trade-off is that native texturing required the video to be captured as 32-bit BGRA on the native side, and it still had to be converted to generate a luma-only version for the tracking. It was found to be more generally more efficient to capture in YUV422 and only convert to BGRA when Unity needed a frame, at the expense of keeping an additional frame buffer around. We could add it back in if it was still of interest.

OptrixAU commented 4 years ago

Hmm...I found that performance is much better, so I'm currently not particularly upset it's gone. Unfortunately it's just been causing crashes in my application since the upgrade from v5 to X.

Perhaps the proper resolution to this bug is simply to remove the option from the Editor for now, force it to 'false' in code, and re-introduce it if required in the future?

Or at least force the value to 'false' during startup on iOS and Android platforms, since it seems to work OK in Windows?