Skip to content
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

Force probe to render again if first time was during async shader compilation #1847

Merged
merged 2 commits into from
Sep 25, 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
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Workaround issue that caused objects using eye shader to not be rendered on xbox.
- Fixed text in cascades shadow split being truncated.
- Fixed rendering of custom passes in the Custom Pass Volume inspector
- Force probe to render again if first time was during async shader compilation to avoid having cyan objects.

### Changed
- Preparation pass for RTSSShadows to be supported by render graph.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System;
using UnityEngine.Serialization;
#if UNITY_EDITOR
using UnityEditor;
#endif

namespace UnityEngine.Rendering.HighDefinition
{
Expand Down Expand Up @@ -121,6 +124,9 @@ float aspect
RTHandle m_RealtimeDepthBuffer;
RenderData m_RealtimeRenderData;
bool m_WasRenderedSinceLastOnDemandRequest = true;
#if UNITY_EDITOR
bool m_WasRenderedDuringAsyncCompilation = false;
#endif

// Array of names that will be used in the Render Loop to name the probes in debug
internal string[] probeName = new string[6];
Expand All @@ -129,6 +135,10 @@ internal bool requiresRealtimeUpdate
{
get
{
#if UNITY_EDITOR
if (m_WasRenderedDuringAsyncCompilation && !ShaderUtil.anythingCompiling)
return true;
#endif
if (mode != ProbeSettings.Mode.Realtime)
return false;
switch (realtimeMode)
Expand Down Expand Up @@ -468,6 +478,9 @@ internal Matrix4x4 proxyToWorld

internal void SetIsRendered(int frame)
{
#if UNITY_EDITOR
m_WasRenderedDuringAsyncCompilation = ShaderUtil.anythingCompiling;
#endif
m_WasRenderedSinceLastOnDemandRequest = true;
wasRenderedAfterOnEnable = true;
lastRenderedFrame = frame;
Expand Down