// Token: 0x06000A39 RID: 2617 RVA: 0x0002C990 File Offset: 0x0002AB90 private static void OnSceneCameraPreRender(SceneCamera sceneCamera) { if (sceneCamera.cameraRigController) { DitherModel.RefreshObstructorsForCamera(sceneCamera.cameraRigController); } }
// Token: 0x06000A3A RID: 2618 RVA: 0x0002C9AC File Offset: 0x0002ABAC private static void RefreshObstructorsForCamera(CameraRigController cameraRigController) { Vector3 position = cameraRigController.transform.position; for (int i = 0; i < DitherModel.instancesList.Count; i++) { DitherModel ditherModel = DitherModel.instancesList[i]; if (ditherModel.bounds) { Vector3 a = ditherModel.bounds.ClosestPointOnBounds(position); ditherModel.fade = Mathf.Clamp01(Util.Remap(Vector3.Distance(a, position), cameraRigController.fadeStartDistance, cameraRigController.fadeEndDistance, 0f, 1f)); ditherModel.UpdateDither(); } else { Debug.LogFormat("{0} has missing collider for dither model", new object[] { ditherModel.gameObject }); } } }