Skip to content

Fixed an issue where rendering preview with MSAA might generate render graph errors. #800

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 3 commits into from
Jun 10, 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 @@ -372,9 +372,10 @@ public void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, in
}
catch (Exception e)
{
m_ExecutionExceptionWasRaised = true;
Debug.LogError("Render Graph Execution error");
Debug.LogException(e);
if (!m_ExecutionExceptionWasRaised) // Already logged. TODO: There is probably a better way in C# to handle that.
Debug.LogException(e);
m_ExecutionExceptionWasRaised = true;
}
finally
{
Expand Down Expand Up @@ -836,6 +837,7 @@ void ExecuteRenderGraph(ScriptableRenderContext renderContext, CommandBuffer cmd
m_ExecutionExceptionWasRaised = true;
Debug.LogError($"Render Graph Execution error at pass {passInfo.pass.name} ({passIndex})");
Debug.LogException(e);
throw;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,10 @@ void SetGlobalTextures(RenderGraphContext rgContext, List<TextureHandle> texture
var resourceDesc = GetTextureResource(resource);
if (resourceDesc.shaderProperty != 0)
{
if (resourceDesc.rt == null)
if (resourceDesc.rt != null)
{
throw new InvalidOperationException(string.Format("Trying to set Global Texture parameter for \"{0}\" which was never created.\nCheck that at least one write operation happens before reading it.", resourceDesc.desc.name));
rgContext.cmd.SetGlobalTexture(resourceDesc.shaderProperty, bindDummyTexture ? TextureXR.GetMagentaTexture() : resourceDesc.rt);
}
rgContext.cmd.SetGlobalTexture(resourceDesc.shaderProperty, bindDummyTexture ? TextureXR.GetMagentaTexture() : resourceDesc.rt);
}
}
}
Expand Down
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 @@ -668,6 +668,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix issue causing blocky artifacts when decals affect metallic and are applied on material with specular color workflow.
- Fixed issue with depth pyramid generation and dynamic resolution.
- Fixed an issue where decals were duplicated in prefab isolation mode.
- Fixed an issue where rendering preview with MSAA might generate render graph errors.

### Changed
- Improve MIP selection for decals on Transparents
Expand Down