static void Drawer_InfluenceProxyMissmatch(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
 {
     if (p.proxyVolumeComponent.objectReferenceValue != null)
     {
         var proxy = (ReflectionProxyVolumeComponent)p.proxyVolumeComponent.objectReferenceValue;
         if ((int)proxy.proxyVolume.shapeType != p.influenceShape.enumValueIndex)
         {
             EditorGUILayout.HelpBox(
                 "Proxy volume and influence volume have different shape types, this is not supported.",
                 MessageType.Error,
                 true
                 );
         }
     }
 }
Example #2
0
        void OnSceneGUI()
        {
            var s = m_UIState;
            var p = m_SerializedHdReflectionProbe;
            var o = this;

            BakeRealtimeProbeIfPositionChanged(s, p, o);

            HDReflectionProbeUI.DoShortcutKey(p, o);

            if (!s.sceneViewEditing)
            {
                return;
            }

            var mat = p.target.transform.localToWorldMatrix;

            EditorGUI.BeginChangeCheck();

            switch (EditMode.editMode)
            {
            // Influence editing
            case EditMode.SceneViewEditMode.ReflectionProbeBox:
                InfluenceVolumeUI.DrawHandles_EditBase(s.influenceVolume, p.targetData.influenceVolume, o, mat, p.targetData);
                break;

            // Influence fade editing
            case EditMode.SceneViewEditMode.GridBox:
                InfluenceVolumeUI.DrawHandles_EditInfluence(s.influenceVolume, p.targetData.influenceVolume, o, mat, p.targetData);
                break;

            // Influence normal fade editing
            case EditMode.SceneViewEditMode.Collider:
                InfluenceVolumeUI.DrawHandles_EditInfluenceNormal(s.influenceVolume, p.targetData.influenceVolume, o, mat, p.targetData);
                break;

            // Origin editing
            case EditMode.SceneViewEditMode.ReflectionProbeOrigin:
                Handle_OriginEditing(s, p, o);
                break;
            }

            if (EditorGUI.EndChangeCheck())
            {
                Repaint();
            }
        }
 static void Drawer_InfluenceShapeSphereSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
 {
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.PropertyField(p.influenceSphereRadius, CoreEditorUtils.GetContent("Radius"));
     if (GUILayout.Button(toolbar_Contents[0], GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.Height(EditorGUIUtility.singleLineHeight + 3)))
     {
         EditMode.ChangeEditMode(EditMode.SceneViewEditMode.ReflectionProbeBox, GetBoundsGetter(p)(), owner);
     }
     EditorGUILayout.EndHorizontal();
     EditorGUILayout.BeginHorizontal();
     EditorGUILayout.PropertyField(p.boxOffset, CoreEditorUtils.GetContent("Sphere Offset|The center of the sphere in which the reflections will be applied to objects. The value is relative to the position of the Game Object."));
     if (GUILayout.Button(toolbar_Contents[3], GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.Height(EditorGUIUtility.singleLineHeight + 3)))
     {
         EditMode.ChangeEditMode(EditMode.SceneViewEditMode.ReflectionProbeOrigin, GetBoundsGetter(p)(), owner);
     }
     EditorGUILayout.EndHorizontal();
 }
Example #4
0
        void OnSceneGUI()
        {
            var s = m_UIState;
            var p = m_SerializedHdReflectionProbe;
            var o = this;

            BakeRealtimeProbeIfPositionChanged(s, p, o);

            HDReflectionProbeUI.DoShortcutKey(p, o);

            if (!s.sceneViewEditing)
            {
                return;
            }

            EditorGUI.BeginChangeCheck();

            switch (EditMode.editMode)
            {
            // Influence editing
            case EditMode.SceneViewEditMode.ReflectionProbeBox:
                Handle_InfluenceEditing(s, p, o);
                break;

            // Influence fade editing
            case EditMode.SceneViewEditMode.GridBox:
                Handle_InfluenceFadeEditing(s, p, o, InfluenceType.Standard);
                break;

            // Influence normal fade editing
            case EditMode.SceneViewEditMode.Collider:
                Handle_InfluenceFadeEditing(s, p, o, InfluenceType.Normal);
                break;

            // Origin editing
            case EditMode.SceneViewEditMode.ReflectionProbeOrigin:
                Handle_OriginEditing(s, p, o);
                break;
            }

            if (EditorGUI.EndChangeCheck())
            {
                Repaint();
            }
        }
        public override void OnInspectorGUI()
        {
            //InspectColorsGUI();

            var s = m_UIState;
            var p = m_SerializedHdReflectionProbe;

            s.Update();
            p.Update();

            HDReflectionProbeUI.Inspector.Draw(s, p, this);

            PerformOperations(s, p, this);

            p.Apply();

            HideAdditionalComponents(false);

            HDReflectionProbeUI.DoShortcutKey(p, this);
        }
        static void Drawer_SectionShapeSphere(InfluenceVolumeUI s, SerializedInfluenceVolume d, Editor o, bool drawOffset, bool drawNormal)
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PropertyField(d.sphereRadius, _.GetContent("Radius"));
            PlanarReflectionProbeUI.Drawer_ToolBarButton(0, o, GUILayout.Width(28f), GUILayout.MinHeight(22f));
            EditorGUILayout.EndHorizontal();

            if (drawOffset)
            {
                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.PropertyField(d.offset, _.GetContent("Offset"));
                HDReflectionProbeUI.Drawer_ToolBarButton(3, o, GUILayout.Width(28f), GUILayout.MinHeight(22f));
                EditorGUILayout.EndHorizontal();
            }

            EditorGUILayout.Space();
            var maxBlendDistance = d.sphereRadius.floatValue;

            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(d.sphereBlendDistance, _.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes."));
            if (EditorGUI.EndChangeCheck())
            {
                d.sphereBlendDistance.floatValue = Mathf.Clamp(d.sphereBlendDistance.floatValue, 0, maxBlendDistance);
            }
            PlanarReflectionProbeUI.Drawer_ToolBarButton(1, o, GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.MinHeight(22f), GUILayout.MaxHeight(EditorGUIUtility.singleLineHeight + 3));
            EditorGUILayout.EndHorizontal();

            if (drawNormal)
            {
                EditorGUILayout.BeginHorizontal();
                EditorGUI.BeginChangeCheck();
                EditorGUILayout.PropertyField(d.sphereBlendNormalDistance, _.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes."));
                if (EditorGUI.EndChangeCheck())
                {
                    d.sphereBlendNormalDistance.floatValue = Mathf.Clamp(d.sphereBlendNormalDistance.floatValue, 0, maxBlendDistance);
                }
                PlanarReflectionProbeUI.Drawer_ToolBarButton(2, o, GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.MinHeight(22f), GUILayout.MaxHeight(EditorGUIUtility.singleLineHeight + 3));
                EditorGUILayout.EndHorizontal();
            }
        }
        static void Drawer_InfluenceSphereSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
        {
            var maxBlendDistance = HDReflectionProbeEditorUtility.CalculateSphereMaxBlendDistance(s, p, owner);

            var blendDistance = p.blendDistancePositive.vector3Value.x;

            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = p.blendDistancePositive.hasMultipleDifferentValues;
            blendDistance            = EditorGUILayout.Slider(CoreEditorUtils.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes."), blendDistance, 0, maxBlendDistance);
            if (EditorGUI.EndChangeCheck())
            {
                p.blendDistancePositive.vector3Value = Vector3.one * blendDistance;
                p.blendDistanceNegative.vector3Value = Vector3.one * blendDistance;
            }
            if (GUILayout.Button(toolbar_Contents[1], GUILayout.Width(28f), GUILayout.Height(EditorGUIUtility.singleLineHeight + 3)))
            {
                EditMode.ChangeEditMode(k_Toolbar_SceneViewEditModes[1], GetBoundsGetter(p)(), owner);
            }
            EditorGUILayout.EndHorizontal();

            var blendNormalDistance = p.blendNormalDistancePositive.vector3Value.x;

            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = p.blendNormalDistancePositive.hasMultipleDifferentValues;
            blendNormalDistance      = EditorGUILayout.Slider(CoreEditorUtils.GetContent("Blend Normal Distance|Area around the probe where the normals influence the probe. Only used in deferred probes."), blendNormalDistance, 0, maxBlendDistance);
            if (EditorGUI.EndChangeCheck())
            {
                p.blendNormalDistancePositive.vector3Value = Vector3.one * blendNormalDistance;
                p.blendNormalDistanceNegative.vector3Value = Vector3.one * blendNormalDistance;
            }
            if (GUILayout.Button(toolbar_Contents[2], GUILayout.Width(28f), GUILayout.Height(EditorGUIUtility.singleLineHeight + 3)))
            {
                EditMode.ChangeEditMode(k_Toolbar_SceneViewEditModes[2], GetBoundsGetter(p)(), owner);
            }
            EditorGUILayout.EndHorizontal();
            EditorGUI.showMixedValue = false;
        }
        static void Drawer_InfluenceShape(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
        {
            EditorGUI.BeginChangeCheck();
            EditorGUI.showMixedValue = p.influenceShape.hasMultipleDifferentValues;
            EditorGUILayout.PropertyField(p.influenceShape, CoreEditorUtils.GetContent("Shape"));
            EditorGUI.showMixedValue = false;
            if (EditorGUI.EndChangeCheck())
            {
                s.SetShapeTarget(p.influenceShape.intValue);
            }

            switch ((ShapeType)p.influenceShape.enumValueIndex)
            {
            case ShapeType.Box:
                Drawer_InfluenceShapeBoxSettings(s, p, owner);
                break;

            case ShapeType.Sphere:
                Drawer_InfluenceShapeSphereSettings(s, p, owner);
                break;
            }
        }
        static void Drawer_InfluenceBoxSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
        {
            bool advanced         = p.editorAdvancedModeEnabled.boolValue;
            var  maxBlendDistance = HDReflectionProbeEditorUtility.CalculateBoxMaxBlendDistance(s, p, owner);

            EditorGUILayout.BeginHorizontal();
            Drawer_AdvancedBlendDistance(
                p,
                false,
                maxBlendDistance,
                CoreEditorUtils.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes.")
                );
            if (GUILayout.Button(toolbar_Contents[1], GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.MinHeight(22f), GUILayout.MaxHeight((advanced ? 3 : 1) * (EditorGUIUtility.singleLineHeight + 3))))
            {
                EditMode.ChangeEditMode(k_Toolbar_SceneViewEditModes[1], GetBoundsGetter(p)(), owner);
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            Drawer_AdvancedBlendDistance(
                p,
                true,
                maxBlendDistance,
                CoreEditorUtils.GetContent("Blend Normal Distance|Area around the probe where the normals influence the probe. Only used in deferred probes.")
                );
            if (GUILayout.Button(toolbar_Contents[2], GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.MinHeight(22f), GUILayout.MaxHeight((advanced ? 3 : 1) * (EditorGUIUtility.singleLineHeight + 3))))
            {
                EditMode.ChangeEditMode(k_Toolbar_SceneViewEditModes[2], GetBoundsGetter(p)(), owner);
            }
            EditorGUILayout.EndHorizontal();

            if (advanced)
            {
                CoreEditorUtils.DrawVector6(
                    CoreEditorUtils.GetContent("Face fade|Fade faces of the cubemap."),
                    p.boxSideFadePositive, p.boxSideFadeNegative, Vector3.zero, Vector3.one, HDReflectionProbeEditor.k_handlesColor);
            }
        }
        static void Drawer_AdditionalSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
        {
            EditorGUILayout.PropertyField(p.weight, CoreEditorUtils.GetContent("Influence Volume Weight|Blending weight to use while interpolating between influence volume. (Reminder: Sky is an Influence Volume too)."));

            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(p.multiplier, CoreEditorUtils.GetContent("Multiplier|Tweeking option to enhance reflection."));
            if (EditorGUI.EndChangeCheck())
            {
                p.multiplier.floatValue = Mathf.Max(0.0f, p.multiplier.floatValue);
            }

            if (p.so.targetObjects.Length == 1)
            {
                var probe = p.target;
                if (probe.mode == ReflectionProbeMode.Custom && probe.customBakedTexture != null)
                {
                    var cubemap = probe.customBakedTexture as Cubemap;
                    if (cubemap && cubemap.mipmapCount == 1)
                    {
                        EditorGUILayout.HelpBox("No mipmaps in the cubemap, Smoothness value in Standard shader will be ignored.", MessageType.Warning);
                    }
                }
            }
        }
 static void Drawer_IntensityMultiplier(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
 {
     EditorGUILayout.PropertyField(p.intensityMultiplier, CoreEditorUtils.GetContent("Intensity"));
 }
 static void PerformOperations(HDReflectionProbeUI s, SerializedHDReflectionProbe p, HDReflectionProbeEditor o)
 {
 }
Example #13
0
 public static Vector3 CalculateBoxMaxBlendDistance(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor o)
 {
     return(p.boxSize.vector3Value * 0.5f);
 }
Example #14
0
 public static float CalculateSphereMaxBlendDistance(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor o)
 {
     return(p.influenceSphereRadius.floatValue);
 }
 static void Drawer_BakeActions(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
 {
     EditorReflectionSystemGUI.DrawBakeButton((ReflectionProbeMode)p.mode.intValue, p.target);
 }
Example #16
0
        static void Handle_InfluenceEditing(HDReflectionProbeUI s, SerializedHDReflectionProbe sp, Editor o)
        {
            var mat = Handles.matrix;
            var col = Handles.color;

            Handles.matrix = HDReflectionProbeEditorUtility.GetLocalSpace(sp.target);
            switch ((ShapeType)sp.influenceShape.enumValueIndex)
            {
            case ShapeType.Box:
            {
                s.alternativeBoxInfluenceHandle.center = sp.target.center;
                s.alternativeBoxInfluenceHandle.size   = sp.target.size;

                EditorGUI.BeginChangeCheck();
                s.alternativeBoxInfluenceHandle.DrawHandle();
                if (EditorGUI.EndChangeCheck())
                {
                    Undo.RecordObject(sp.target, "Modified Reflection Probe AABB");
                    Undo.RecordObject(sp.targetData, "Modified Reflection Probe AABB");

                    Vector3 center;
                    Vector3 size;
                    center = s.alternativeBoxInfluenceHandle.center;
                    size   = s.alternativeBoxInfluenceHandle.size;

                    HDReflectionProbeEditorUtility.ValidateAABB(sp.target, ref center, ref size);

                    sp.target.center = center;
                    sp.target.size   = size;

                    //ApplyConstraintsOnTargets(s, sp, o);

                    EditorUtility.SetDirty(sp.target);
                    EditorUtility.SetDirty(sp.targetData);
                }
                break;
            }

            case ShapeType.Sphere:
            {
                s.sphereInfluenceHandle.center = sp.target.center;
                s.sphereInfluenceHandle.radius = sp.targetData.influenceSphereRadius;

                Handles.color = k_GizmoThemeColorExtent;
                EditorGUI.BeginChangeCheck();
                s.sphereInfluenceHandle.DrawHandle();
                if (EditorGUI.EndChangeCheck())
                {
                    Undo.RecordObject(sp.target, "Modified Reflection Probe AABB");
                    Undo.RecordObject(sp.targetData, "Modified Reflection Probe AABB");

                    var center          = sp.target.center;
                    var influenceRadius = s.sphereInfluenceHandle.radius;
                    var radius          = Vector3.one * influenceRadius;

                    HDReflectionProbeEditorUtility.ValidateAABB(sp.target, ref center, ref radius);
                    influenceRadius = radius.x;

                    sp.targetData.influenceSphereRadius = influenceRadius;

                    //ApplyConstraintsOnTargets(s, sp, o);

                    EditorUtility.SetDirty(sp.target);
                    EditorUtility.SetDirty(sp.targetData);
                }
                break;
            }
            }
            Handles.matrix = mat;
            Handles.color  = col;
        }
 static void Drawer_InfluenceSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
 {
     EditorGUILayout.PropertyField(p.boxProjection, CoreEditorUtils.GetContent("Parallax Correction|Parallax Correction causes reflections to appear to change based on the object's position within the probe's box, while still using a single probe as the source of the reflection. This works well for reflections on objects that are moving through enclosed spaces such as corridors and rooms. Setting Parallax Correction to False and the cubemap reflection will be treated as coming from infinitely far away. Note that this feature can be globally disabled from Graphics Settings -> Tier Settings"));
 }
Example #18
0
        static void Handle_InfluenceFadeEditing(HDReflectionProbeUI s, SerializedHDReflectionProbe sp, Editor o, InfluenceType influenceType)
        {
            Gizmo6FacesBoxContained alternativeBlendBox;
            SphereBoundsHandle      sphereHandle;
            Vector3 probeBlendDistancePositive, probeBlendDistanceNegative;
            Color   color;

            switch (influenceType)
            {
            default:
            case InfluenceType.Standard:
            {
                alternativeBlendBox        = s.alternativeBoxBlendHandle;
                sphereHandle               = s.sphereBlendHandle;
                probeBlendDistancePositive = sp.targetData.blendDistancePositive;
                probeBlendDistanceNegative = sp.targetData.blendDistanceNegative;
                color = k_GizmoThemeColorInfluenceBlend;
                break;
            }

            case InfluenceType.Normal:
            {
                alternativeBlendBox        = s.alternativeBoxBlendNormalHandle;
                sphereHandle               = s.sphereBlendNormalHandle;
                probeBlendDistancePositive = sp.targetData.blendNormalDistancePositive;
                probeBlendDistanceNegative = sp.targetData.blendNormalDistanceNegative;
                color = k_GizmoThemeColorInfluenceNormalBlend;
                break;
            }
            }

            var mat = Handles.matrix;
            var col = Handles.color;

            Handles.matrix = HDReflectionProbeEditorUtility.GetLocalSpace(sp.target);
            switch ((ShapeType)sp.influenceShape.enumValueIndex)
            {
            case ShapeType.Box:
            {
                alternativeBlendBox.center = sp.target.center - (probeBlendDistancePositive - probeBlendDistanceNegative) * 0.5f;
                alternativeBlendBox.size   = sp.target.size - probeBlendDistancePositive - probeBlendDistanceNegative;

                alternativeBlendBox.container.center = sp.target.center;
                alternativeBlendBox.container.size   = sp.target.size;

                EditorGUI.BeginChangeCheck();
                alternativeBlendBox.DrawHandle();
                if (EditorGUI.EndChangeCheck())
                {
                    Undo.RecordObject(sp.target, "Modified Reflection Probe Influence");
                    Undo.RecordObject(sp.targetData, "Modified Reflection Probe Influence");

                    var center        = sp.target.center;
                    var influenceSize = sp.target.size;

                    var diff     = 2 * (alternativeBlendBox.center - center);
                    var sum      = influenceSize - (alternativeBlendBox.size);
                    var positive = (sum - diff) * 0.5f;
                    var negative = (sum + diff) * 0.5f;
                    var blendDistancePositive = Vector3.Max(Vector3.zero, Vector3.Min(positive, influenceSize));
                    var blendDistanceNegative = Vector3.Max(Vector3.zero, Vector3.Min(negative, influenceSize));

                    probeBlendDistancePositive = blendDistancePositive;
                    probeBlendDistanceNegative = blendDistanceNegative;

                    ApplyConstraintsOnTargets(s, sp, o);

                    EditorUtility.SetDirty(sp.target);
                    EditorUtility.SetDirty(sp.targetData);
                }
                break;
            }

            case ShapeType.Sphere:
            {
                sphereHandle.center = sp.target.center;
                sphereHandle.radius = Mathf.Clamp(sp.targetData.influenceSphereRadius - probeBlendDistancePositive.x, 0, sp.targetData.influenceSphereRadius);

                Handles.color = k_GizmoThemeColorExtent;
                EditorGUI.BeginChangeCheck();
                Handles.color = color;
                sphereHandle.DrawHandle();
                if (EditorGUI.EndChangeCheck())
                {
                    Undo.RecordObject(sp.target, "Modified Reflection influence volume");
                    Undo.RecordObject(sp.targetData, "Modified Reflection influence volume");

                    var influenceRadius = sp.targetData.influenceSphereRadius;
                    var blendRadius     = sphereHandle.radius;

                    var blendDistance = Mathf.Clamp(influenceRadius - blendRadius, 0, influenceRadius);

                    probeBlendDistancePositive = Vector3.one * blendDistance;
                    probeBlendDistanceNegative = probeBlendDistancePositive;

                    ApplyConstraintsOnTargets(s, sp, o);

                    EditorUtility.SetDirty(sp.target);
                    EditorUtility.SetDirty(sp.targetData);
                }
                break;
            }
            }
            Handles.matrix = mat;
            Handles.color  = col;


            switch (influenceType)
            {
            default:
            case InfluenceType.Standard:
            {
                sp.blendDistancePositive.vector3Value = probeBlendDistancePositive;
                sp.blendDistanceNegative.vector3Value = probeBlendDistanceNegative;

                //save advanced/simplified saved data
                if (sp.editorAdvancedModeEnabled.boolValue)
                {
                    sp.editorAdvancedModeBlendDistancePositive.vector3Value = probeBlendDistancePositive;
                    sp.editorAdvancedModeBlendDistanceNegative.vector3Value = probeBlendDistanceNegative;
                }
                else
                {
                    sp.editorSimplifiedModeBlendDistance.floatValue = probeBlendDistancePositive.x;
                }
                break;
            }

            case InfluenceType.Normal:
            {
                sp.blendNormalDistancePositive.vector3Value = probeBlendDistancePositive;
                sp.blendNormalDistanceNegative.vector3Value = probeBlendDistanceNegative;

                //save advanced/simplified saved data
                if (sp.editorAdvancedModeEnabled.boolValue)
                {
                    sp.editorAdvancedModeBlendNormalDistancePositive.vector3Value = probeBlendDistancePositive;
                    sp.editorAdvancedModeBlendNormalDistanceNegative.vector3Value = probeBlendDistanceNegative;
                }
                else
                {
                    sp.editorSimplifiedModeBlendNormalDistance.floatValue = probeBlendDistancePositive.x;
                }
                break;
            }
            }
            sp.Apply();
        }
 static void Drawer_ModeSettingsRealtime(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)
 {
     EditorGUILayout.PropertyField(p.refreshMode, CoreEditorUtils.GetContent("Refresh Mode|Controls how this probe refreshes in the Player"));
     EditorGUILayout.PropertyField(p.timeSlicingMode, CoreEditorUtils.GetContent("Time Slicing|If enabled this probe will update over several frames, to help reduce the impact on the frame rate"));
 }