CariusLars / ar_flutter_plugin

Flutter Plugin for AR (Augmented Reality) - Supports ARKit on iOS and ARCore on Android devices
MIT License
318 stars 229 forks source link

Lighting in iOS #134

Open remakerich opened 1 year ago

remakerich commented 1 year ago

Hello, I'm now testing this library and wondering if it's possible to activate some sort of shaders or lighting in iOS version.

On Android objects rendered with shaders and even some shadows.

But on iOS it's just plain 3D object, which is quite difficult to inspect, because it has no fidelity.

Does anyone know how to fix it?

remakerich commented 1 year ago

I found this setting. Its here https://github.com/CariusLars/ar_flutter_plugin/blob/fde3f11a13e00abb88f6cc7087ba9ecedfc1b06d/ios/Classes/IosARView.swift#L232

just add configuration.environmentTexturing = .automatic after this line and you'll get some sort of environmental lighting.

CariusLars commented 1 year ago

Hey @remakerich , could you PR this so we can add it to the plugin for everyone? :)