Is it possible to sample custom depth in UI Material?
I have been trying to sample custom depth in User Interface Material Domain. I have assigned the material as translucency and tried various combinations of Sample Scene Texture and pixel depth to no avail. I am starting to wonder whether its possible at all to sample the custom depth in anything other than Post Process?
The general idea is to get the UI to render behind the main character but on top of everything else in order have no clip with walls.
Best Regards Vincent
asked Oct 22 '15 at 07:09 AM in Rendering
Through an accident I discovered that a UI Material can sample from Custom Stencil when drawn in HUD event! Thus you could get that the material is occluded only by the player.
But when using widgets its still not possible to sample Custom Depth in UI material.
The current working idea is to move everything from widget to HUD with draw simple. If there is another way, I would be very eager to hear about it. :)
answered Nov 20 '15 at 10:11 AM
UI Materials and the UI specifically cannot read from Scene Depth at all. It is rendered outside of the world Scene Depth passes.
answered Nov 10 '15 at 09:02 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here