Skip to content

Bugfix 1357311: Fixed old ray tracing material conversion #5364

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 2 commits into from
Aug 19, 2021
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 @@ -367,6 +367,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed the volumetric clouds having no control over the vertical wind (case 1354920).
- Fixed case where the SceneView don't refresh when using LightExplorer with a running and Paused game (1354129)
- Fixed wrong ordering in FrameSettings (Normalize Reflection Probes)
- Fixed old ray tracing material conversion

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,6 @@ static void ZWriteForTransparent(Material material, HDShaderUtils.ShaderID id)
#endregion
static void RenderQueueUpgrade(Material material, HDShaderUtils.ShaderID id)
{
// In order for the ray tracing keyword to be taken into account, we need to make it dirty so that the parameter is created first
HDShaderUtils.ResetMaterialKeywords(material);

// Replace previous ray tracing render queue for opaque to regular opaque with raytracing
if (material.renderQueue == ((int)UnityEngine.Rendering.RenderQueue.GeometryLast + 20))
{
Expand All @@ -540,6 +537,9 @@ static void RenderQueueUpgrade(Material material, HDShaderUtils.ShaderID id)
material.SetFloat(kRayTracing, 1.0f);
}

// In order for the ray tracing keyword to be taken into account, we need to make it dirty so that the parameter is created first
HDShaderUtils.ResetMaterialKeywords(material);

// For shader graphs, there is an additional pass we need to do
if (material.HasProperty("_RenderQueueType"))
{
Expand Down