Unity-Technologies / XRLineRenderer

An XR-Focused line renderer that mimics rendering with 3d capsules while only using two quads worth of geometry.
Other
303 stars 44 forks source link

Does not seem to work with URP? #17

Open Kulgann opened 4 years ago

Kulgann commented 4 years ago

The shaders dont work on URP or am I missing something?

ptbarnaby commented 4 years ago

Just spent several hours debugging this on URP, it seems that when Dynamic Batching is enabled on the Pipeline Asset then some strange issues start happening - for me I had several XR Line Renderers using the same material and they would either be transformed in the wrong place or have strange angles, only having one enabled seemed to be fine but as soon as I turned on another (and presumably dynamic batching kicked in) then I would get the issue). Either disabling this or adding the following to the Shader Tags fixes the issue:

"DisableBatching" = "True"

Special thanks to GearKlik for this - http://answers.unity.com/answers/1131179/view.html

justinwasilenko commented 3 years ago

I just tried this as well with URP & Unity 2021.1 on android. Did not work sadly. I could really make use of this feature. Looks great on PCVR.