HIVE-ResearchGroup / OpenXR_Varjo_Template

An Unity template using HDRP which uses OpenXR, the new Unity Input System with support of all Varjo features.
3 stars 0 forks source link

Make the template compatible with BiRP and URP #25

Closed Xovval closed 2 years ago

Xovval commented 2 years ago

Use the following to adapt the Varjo Code and make it potentially useable with all three render pipelines.

https://forum.unity.com/threads/hdrp-lwrp-detection-from-editor-script.540642/#post-7901968

Xovval commented 2 years ago

Basic support implemented with the following restrictions:

It is possible to use the scripts and prefabs inside this template to use some of the Varjo features also in your SRP/URP project. Note, that you will only have support for AR mode and Depth testing. Please be aware that you will have to set your own settings for lights, shaders, materials, reflections. If you still want to continue, please export the prefabs and the scripts (scenes are also possible) from the template as an Asset and import it in your preferred environment. Notice that with the current release, you will have to import the Varjo samples in your project as well in order to get the latest version of the controller. Doing that, you might have to delete some scripts inside the Sample folder as they not support other pipelines. Furthermore, you might will have to create a new ShadowCatcher material for the ground as the one used in the template is created for HDRP. (Copied from Readme - 13.04.2022)

Xovval commented 2 years ago

It's still possible to adapt the scripts (as the necessary code is still there but commented) in order to achieve support - it just won't do it automatically.

To do so: Just uncomment the code and make sure to comment the sections which would've been in a HDRP section! (You will notice them as the identifiers were also just commented)

Xovval commented 2 years ago

TODO: Create DEFINES inside Player