Created
June 4, 2020 20:02
-
-
Save andijakl/e7ef907354e7501d474d868c7fcf5ce1 to your computer and use it in GitHub Desktop.
Snippet of the EnvironmentalLight code of Google ARCore for Unity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LightEstimate estimate = Frame.LightEstimate; | |
// Updates directional light | |
DirectionalLight.transform.rotation = estimate.DirectionalLightRotation; | |
DirectionalLight.color = estimate.DirectionalLightColor; | |
// Set ambient probe | |
RenderSettings.ambientMode = AmbientMode.Skybox; | |
RenderSettings.ambientProbe = estimate.AmbientProbe; | |
// Set reflection probe (if activated) | |
RenderSettings.defaultReflectionMode = DefaultReflectionMode.Custom; | |
RenderSettings.customReflection = estimate.ReflectionProbe; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment