Hello!
I was looking through the Custom Pass Volume and example Outline shader provided in the HDRP documentation found here: https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/master/com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass.md
and a slightly different variant also found here: Redirecting to latest version of com.unity.render-pipelines.high-definition
I have tried both solutions, but is seems that either the Shader code is not set up correctly to account for use in VR applications OR the Custom Pass script is not ready for use in VR Applications.
As I am not sure how to read or modify shader code, I don’t really know how I am supposed to make this work, as there is no way afaik to make an Outline effect via Shader Graph that is a viable work-around.
I would be really grateful for any help in making this work in VR as this is crucial for my project.
I am currently using Unity 2019.3.0f1 and HDRP 7.1.6
When using Multi-Pass everything works as intended. The problem seems to occur only in Single Pass Instanced
Hey,
There was an error in this example of the doc, it misses
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(varyings);
At the beginning of the fragment shader. This will be fixed when we realease the next version of the documentation.
By the way, if you want to have more custom pass examples you can explore this repository: GitHub - alelievr/HDRP-Custom-Passes: A bunch of custom passes made for HDRP . Most of the effects should work on VR.
2 Likes
Antoine Lelievre:
Hey,
There was an error in this example of the doc, it misses
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(varyings);
At the beginning of the fragment shader. This will be fixed when we realease the next version of the documentation.
By the way, if you want to have more custom pass examples you can explore this repository: GitHub - alelievr/HDRP-Custom-Passes: A bunch of custom passes made for HDRP . Most of the effects should work on VR.
Thank you so much it works now!
1 Like
Hi,
Apologies for grave-digging this post, I am experiencing an issue related to this topic as described here
Hi,
I am working on a VR Project using the HDRP. Recently I had to implement an outline for the grabbable objects.
I found this resource online GitHub - alelievr/HDRP-Custom-Passes: A bunch of custom passes made for HDRP . I exported the CustomPassVolume from the Outline effect scene and the SelectionColor.cs script as a package.
I imported those into my VR Project and set up the objects that will have an outline in the appropriate layer.
The object has an outline when colliding with the hand…
I have tried both multi pass and single pass instanced with the same result in both modes.
Unity Version is 2019.4.4.1f and HDRP v7.4.1
Any help is welcomed.