Can't get OIT URP sample working with Windows build
Closed this issue · 3 comments
Discussed in #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:
- Create a new URP project from the 3D (URP) blank template.
- Add the OIT git package via the Package Manager.
- Import the "URP Renderer Feature Demo" sample from the package and select it as the current scene.
- 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:
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?)
```</div>
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.
I had a more in-depth debugging session:
- The Post-Processing demo works in build. Therefore I would assume it's not a general problem with the shader resources setup.
- Other URP Renderer features are included in build. Hence it could be a specific setup issue of the renderer feature.
- Inspecting the frame in RenderDoc shows the command
Order Independent Transparency
is present. But it seems to be missing its shader code. The material or shader asset might be stripped in the build process. - Switching off any shader stripping settings did not fix the issue.
Very hard to find, but in the end they just changed the render tag from UniversalRenderPipeline
to UniversalPipeline
. Released with v5.0.1.