Skip to content

Fix a useless repaint & fix in editor #2201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,7 @@ void PrepareExposureCurveData(out float min, out float max)
filterMode = FilterMode.Bilinear,
wrapMode = TextureWrapMode.Clamp
};
m_ExposureCurveTexture.hideFlags = HideFlags.HideAndDontSave;
}

bool minCurveHasPoints = minCurve.length > 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#if UNITY_EDITOR
using UnityEditor;
#endif

namespace UnityEngine.Rendering.HighDefinition
{
class HDRISkyRenderer : SkyRenderer
Expand Down Expand Up @@ -149,8 +153,14 @@ public override void RenderSky(BuiltinSkyParameters builtinParams, bool renderFo

m_SkyHDRIMaterial.SetVector(HDShaderIDs._FlowmapParam, flowmapParam);

scrollFactor += hdriSky.scrollSpeed.value * (Time.time - lastTime) * 0.01f;
lastTime = Time.time;
#if UNITY_EDITOR
// Time.time is not always updated in editor
float time = (float)EditorApplication.timeSinceStartup;
#else
float time = Time.time;
#endif
scrollFactor += hdriSky.scrollSpeed.value * (time - lastTime) * 0.01f;
lastTime = time;
}
else
m_SkyHDRIMaterial.DisableKeyword("SKY_MOTION");
Expand Down