aras-p / UnityGaussianSplatting

Toy Gaussian Splatting visualization in Unity
MIT License
1.94k stars 217 forks source link

Platform: Apple visionOS with Polyspatial / Shader compilation error #124

Closed PanoCAST closed 1 month ago

PanoCAST commented 1 month ago

Thank you very much for developing this tool, we have used it extensively on multiple platforms, it works great.

Now, we would like to test it on Apple Vision Pro and place 3DGS elements in space using Polyspatial. The scene works perfectly in the Editor, but when we build it it gives a shader error. Since your code is already using Vulkan it maybe just a minor thing (also there are a few implementations already that showcase 3DGS on the AVP, but not from Unity as far as I know)

Would you have any suggestion as to what the problem could be?

Shader error in 'Hidden/Gaussian Splatting/Composite': cannot assign to variable 'unity_StereoEyeIndex' with const-qualified type 'const int' at /Applications/Unity/Hub/Editor/2022.3.29f1/Unity.app/Contents/CGIncludes/UnityInstancing.cginc(187) (on metal)

Thank you for your help in advance

aras-p commented 1 month ago

This is probably the same as various "it does not work in VR!" issues on other platforms, i.e. #17. I have exactly zero VR devices around, and no knowledge how to write shaders for it. If someone who knows would contribute solutions/improvements I'd take them, but I don't plan to do it myself.