alelievr / HDRP-Custom-Passes

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

Outline effect not updating with mesh deformation. #27

Closed ModarD closed 3 years ago

ModarD commented 3 years ago

Hi,

I'm using a compute shader to deform the outlined mesh. but the outline is not updating with the mesh deformation. it just keeps the initial shape of the mesh before deformation.

I also noticed that the default orange selection outline in the editor works correctly with mesh deformation.

Any idea what could be causing this issue?

Thank you!

alelievr commented 3 years ago

It's probably because of the override material that replaces your custom deformation shader, that's one of the shortcomings of the current outline in the repo.

One more clever way to handle that would be to render all the objects that need to be outlined with a custom stencil state (using de DrawRenderers API) and then use this stencil to do the outline. The problem then with this is that we lose the ability to have a different outline color per renderer.