Skip to content

Conversation

@alelievr
Copy link
Contributor

@alelievr alelievr commented Jan 7, 2021

Purpose of this PR

Source issue: https://forum.unity.com/threads/draw-order-does-not-work-for-decals-made-with-the-shader-graph.1017283/
And: https://fogbugz.unity3d.com/f/cases/1301137/

Decal Draw Order was always returning 0 for ShaderGraph decals because the ShaderGraph decal shader doesn't have the _Unity_Identify_HDRP_Decal property.

Adding this specific property is not a correct fix so I opted for a simple check if the order property exists or not before returning the actual draw order value.


Testing status

Played a bit with the Draw Order property in a decal material created with ShaderGraph:

DecalOrder.mp4

https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/hd%252Ffix%252Fshader-graph-decal-draw-order/.yamato%252Fall-hdrp.yml%2523PR_HDRP_CUSTOM-REVISION/4794954/job

@sebastienlagarde sebastienlagarde marked this pull request as ready for review January 8, 2021 16:39
@sebastienlagarde sebastienlagarde merged commit 4313b48 into hd/bugfix Jan 8, 2021
@sebastienlagarde sebastienlagarde deleted the hd/fix/shader-graph-decal-draw-order branch January 8, 2021 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants