viromedia / virocore

ViroCore cross-platform AR/VR renderer
MIT License
370 stars 108 forks source link

Ambient light update detection: color vector values not [0,1] #319

Open marcspraragen opened 5 years ago

marcspraragen commented 5 years ago

Environment

Windows, ViroCore 1_16, Android Studio 3.4.1, Galaxy S8+ running Android 9.

Description

Hi--

The function ARScene.Listener.onAmbientLightUpdate (lightIntensity: Float, v:Vector) described here: https://developer.viromedia.com/virocore/reference/com/viro/core/ARScene.Listener.html#onAmbientLightUpdate(float,%20com.viro.core.Vector) specifies values for v (r,g,b) as [0,1].

However, the values in my ARScene appear to be ~1,3, 1.2, and 1.1 (see screenshot).

Is this correct behavior? If I plug the r,g,b values into an AmbientLight or OmniLight in the scene, using mLight!!.color = Color.pack(v.x, v.y, v.z), my rendered objects appear pure black.

Should I alter the values before packing? Should an alpha value be updated?

Reproducible Demo

Use lightcolors

Thanks, --Marc

marcspraragen commented 5 years ago

Anybody? :)