Closed clecleath closed 8 months ago
Can you share the shadergraph? Also, did you follow all of the steps in setting up Depth API? Do the predefined shadergraph implementations work for you?
Here is the shadergraph, I am working on.
And I followed the setting up Depth API.
I have the Occlusion Lit
shader working on materials in my custom scene.
Did you enable alpha clipping?
Yes I have
The setup seems correct, so there's some detail that we're missing here.
Ok, do you have an idea for the fact that the sample scene has the same problem ?
Which sample scene, exactly? And what do you mean by the same problem? The default Lit shadergraph isn't working in the sample scene?
I am talking about the DepthAPI-URP
project in the scene OcclusionToggler
two object are using custom shaders with OcclusionSubGraph
: DodecahedronShadergraph
and SphereStylizedOcclusion
.
And for both of them, when I put my hand in front, the object is still on top of my hand. But when I put my hand in front of the mug for example (which is using Occlusion Lit
) my hand is visible in front of it and the soft occlusion works.
I hope this is clearer
That's clear, so the shadergraph solution doesn't work at all for you but occlusions that use materials with shaders do work.
Do you get any errors in the console when you start up the project?
Yes that's the idea. The problem is only related to the shadergraph solution.
When I start the project I have this in console :
And in the project setup tool I have this :
The project setup tool issue isn't a problem. I do, however, think that your issue is package manager related somehow. That error is telling me that you aren't properly connected to the package manager server. It's likely related somehow to your issue. Are you logged in to Unity?
Yes, I am logged into Unity.
Here the three package that I have the error for :
I'm a bit stumped here, since it seems to be related to the package manager, rather than Depth API itself. I googled your error a bit but couldn't find anything conclusive. There was an old post that I found that mentioned reinstalling a different version of Unity Hub, but I think that's a long shot.
Ok I see.
I think on saturday (I am currently at school), I will try to launch the sample project using Unity 2022.3.9 on another computer to see if there is any changes.
I will let you know if the change of Unity version and computer change something
Thanks a lot for your help,
I'll keep this thread open and we can continue then.
Hello again,
I did some tests this afternoon and finally discovered that the bug looks related to the Unity version. I was using 2022.3.16 and it was not working. I moved my project to 2022.3.9 and it works.
I will stay on 2022.3.9 for now but let me know if you have any ideas about the 2022.3.16 version bug.
Thanks a lot for your help !
I'm glad that it worked out
I just tested in 2022.3.16 and I managed to reproduce the issue. It's package manager related, like I assumed. The solution, if anyone else gets this in later versions of Unity, was to exit the editor, sign out of hub, sign back in, start editor. You'll notice that the packages no longer have a big red "!" next to them.
Thanks for pointing this out, we'll flag this to Unity.
Oh nice, good to know that it can be solved only by signing out and back in.
Hello,
Thanks a lot for this wonderful API.
I got a question regarding the
OcclusionSubGraph
. I am trying to use it with a custom shader but the occlusion does not work.I tried the DepthAPI-URP sample and look at the
LitOccluded
andStylizedOcclusionEffectON
shader. But when I built the project and tried it, the occlusion did not work.So I don't know how to make it work both in the sample scene and in my custom one. Do you have any advice ?
System : Unity 2022.3.16 URP Meta Quest 3
Thanks in advance for your answer