Skip to content

[HDRP] Fix decal draw order for ShaderGraph decal materials #3018

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
Jan 8, 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 @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed an issue with the frame count management for the volumetric fog (case 1299251).
- Fixed issue with shadow mask and area lights.
- Fixed an issue with the capture callback (now includes post processing results).
- Fixed decal draw order for ShaderGraph decal materials.

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,9 @@ public int DrawOrder
{
get
{
if (m_IsHDRenderPipelineDecal)
if (this.m_Material.HasProperty(HDShaderIDs._DrawOrder))
{
return this.m_Material.GetInt("_DrawOrder");
return this.m_Material.GetInt(HDShaderIDs._DrawOrder);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ static class HDShaderIDs
public static readonly int _DecalNormalBufferStencilRef = Shader.PropertyToID("_DecalNormalBufferStencilRef");
public static readonly int _DecalPrepassTexture = Shader.PropertyToID("_DecalPrepassTexture");
public static readonly int _DecalPrepassTextureMS = Shader.PropertyToID("_DecalPrepassTextureMS");
public static readonly int _DrawOrder = Shader.PropertyToID("_DrawOrder");


public static readonly int _WorldSpaceCameraPos = Shader.PropertyToID("_WorldSpaceCameraPos");
Expand Down