happy-turtle / oit-unity

Order-independent Transparency Implementation in Unity with Per-Pixel Linked Lists
Apache License 2.0
186 stars 29 forks source link

Can't get OIT URP sample working with Windows build #28

Closed happy-turtle closed 5 months ago

happy-turtle commented 8 months ago

Discussed in https://github.com/happy-turtle/oit-unity/discussions/27

Originally posted by **MrWilq** January 25, 2024 I followed the readme and can't get the OIT sample URP scene working. These are the steps I follow: 1. Create a new URP project from the 3D (URP) blank template. 2. Add the OIT git package via the Package Manager. 3. Import the "URP Renderer Feature Demo" sample from the package and select it as the current scene. 4. Go to Settings/URP-HighFidelity-Renderer and add the Order Independent Rendering Renderer Feature. The result is that the Unity Editor displays the sample scene correctly, but when I Build and Run the project for Windows Intel 64-bit, only the opaque objects are visible - the transparent ones are missing: ![image](https://github.com/happy-turtle/oit-unity/assets/20680486/c512ae7d-dcfe-4f17-aeb1-1bba0bfedb5a) I've tried it first with Unity 2022.3.15f1 and figured that it must be a wrong version. Tried 2023.2.7f1 with the same result and then tried 2021.3.9f1 (which is mentioned in the project readme as the version that it was tested with) and couldn't even add the Renderer Feature due to script compilation errors: ``` Library\PackageCache\org.happy-turtle.order-independent-transparency@863657d0ad\URP\Runtime\OitPass.cs(31,98): error CS1061: 'ScriptableRenderer' does not contain a definition for 'cameraColorTargetHandle' and no accessible extension method 'cameraColorTargetHandle' accepting a first argument of type 'ScriptableRenderer' could be found (are you missing a using directive or an assembly reference?) ```
happy-turtle commented 8 months ago

I can reproduce the missing render output in a Windows build. A quick debugging didn't reveal any missing shader assets though. So this needs a bit more investigation as to why it's not rendering.

happy-turtle commented 8 months ago

I had a more in-depth debugging session:

happy-turtle commented 5 months ago

Very hard to find, but in the end they just changed the render tag from UniversalRenderPipeline to UniversalPipeline. Released with v5.0.1.