alelievr / HDRP-Custom-Passes

A bunch of custom passes made for HDRP
MIT License
1.25k stars 136 forks source link

Some objects only get oulined in Editor depending on their shader #18

Closed jcrombez closed 3 years ago

jcrombez commented 3 years ago

After i updated HDRP (not sure since which update, i'm using 7.4.3) some object are not outlined while playing in build mode. It depends wich shader (built with Shader Graph) the object outlined is using.

Do you have any idea what a shader could do that would mess with the outline custom pass in build mode ?

alelievr commented 3 years ago

Not sure why it's happening 🤔 Are you using the selection code in this package or the outline custom pass provided in the documentation?

Also, can you tell me which shader graphs are you using that work/doesn't work in the build?

jcrombez commented 3 years ago

Are you talking about this ? https://github.com/alelievr/HDRP-Custom-Passes/blob/master/Assets/CustomPasses/Selection/Shaders/02_Selection_Objects.shader (that's what i'm using)

The shader is from a shader graph based in the "Lit Master" node :

image

alelievr commented 3 years ago

Okay, I tried to repro the issue with this setup:

I created this shadergraph trying to match your settings: image

Created a sphere in the selection scene and applied this shader: image

And it works correctly in build (release and debug): image

Did I miss something in my setup?

jcrombez commented 3 years ago

Sorry for not answering you here, this was during the release period of the project, i had to drop this feature and then totally forgot about it. I guess i'll see next time i need an outline effect if have more success with this :)

Thanks the help anyway !