Hybrid Renderer 0.8.0 - Suddenly much slower

I have a scene that ran very well optimized at 400+ fps both in edit mode as well as in play mode.

Now in play mode it is still at 2.3 ms per frame, but in play mode, frame times are in the high thirties, and it is proportional to the amount of geometry in the scene, but not to the amount of geometry in the view frustum(s).

Also, the HybridRenderer rendered Meshes cause an insane amount of draw calls in Render Main Shadowmap
5592154--577963--upload_2020-3-15_22-20-21.png
but lighting and shadows are independent from this massive, massive performance drop.

The performance changed a few days back after I update packages, and I thought maybe it is a transient bug, but it basically breaks my game :wink:

Any suggestions where I could look would be appreciated. It’s not instancing, and the materials stayed practically the same, … this is with Universal Render Pipeline, of course.

Reducing shadow cascades reduces this figure, but it worked well with 2 or 4 shadow cascades before.

Ok, so I initially wondered why there are an additional 27ms added to every frame. Now I turned off the shadow casting light… and I get this:

5592184--577981--upload_2020-3-15_22-33-38.png

but at the same time still this:
5592184--577984--upload_2020-3-15_22-33-49.png

The slowdown scales with the number of meshes I have. It is independent of postprocessing .

The meshes don’t have a lot of geometry, really. The “saved by batching” number being negative is kind of weird, though. A week or so ago, it was more like this (in my performance test scene)

(sorry for potato quality, had to snip this from my social media history)

Hello @Thygrrr ,
sorry it’s not related to your Thread, but im facing a weird Bug with Hybrid Renderer V2 (Entities 0.8) and it looks like you solved it.

this is how i added the Hybred Renderer V2 to my Project:

  1. i downloaded the full project from Github.

  2. i copied com.unity.render-pipelines.core, com.unity.render-pipelines.universal, com.unity.shadergraph, com.unity.testframework.graphics in the Packages Folder.

  3. i modified the manifest.json :

{
  "dependencies": {
    "com.unity.collab-proxy": "1.3.7",
    "com.unity.collections": "0.7.0-preview.2",
    "com.unity.entities": "0.8.0-preview.8",
    "com.unity.formats.fbx": "2.0.3-preview.3",
    "com.unity.ide.visualstudio": "2.0.0",
    "com.unity.ide.vscode": "1.1.4",
    "com.unity.physics": "0.3.0-preview.1",
    "com.unity.render-pipelines.core": "file:../../../com.unity.render-pipelines.core",
    "com.unity.render-pipelines.universal": "file:../../../com.unity.render-pipelines.universal",
    "com.unity.rendering.hybrid": "0.4.0-preview.8",
    "com.unity.shadergraph": "file:../../../com.unity.shadergraph",
    "com.unity.test-framework": "1.1.11",
    "com.unity.testframework.graphics": "file:../../../com.unity.testframework.graphics",
    "com.unity.textmeshpro": "3.0.0-preview.1",
    "com.unity.timeline": "1.2.12",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.androidjni": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.wind": "1.0.0"
  }
}

when i add the ENABLE_HYBRID_RENDERER_V2 to the scripting defined symbols nothing is rendered anymore, but by removing it, the Old RendererSystemV2 is rendering Correctly.

im using the Unity 2020.1.0b1.

Did I do something wrong ?
Thanks!

I use Unity 2020.1.0b1 as well,and I just add all the packages through the package manager.

Here is my packages manifest:

  GNU nano 4.5                                                                                                                                                   Packages/manifest.json
{
  "dependencies": {
    "com.unity.burst": "1.3.0-preview.6",
    "com.unity.inputsystem": "1.0.0-preview.6",
    "com.unity.jobs": "0.2.7-preview.11",
    "com.unity.physics": "0.3.0-preview.1",
    "com.unity.render-pipelines.universal": "8.0.1",
    "com.unity.rendering.hybrid": "0.4.0-preview.8",
    "com.unity.textmeshpro": "3.0.0-preview.7",
    "com.unity.ugui": "1.0.0",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.androidjni": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
  }
}

When I add that scripting define you describe, I get this compile error:

Library\PackageCache\com.unity.rendering.hybrid@0.4.0-preview.8\Unity.Rendering.Hybrid\CopySkinnedEntityDataToRenderEntity.cs(16,26): error CS0246: The type or namespace name 'RenderMeshSystemV2' could not be found (are you missing a using directive or an assembly reference?

ah ok, you are not using the Hybred Renderer V2, for this you need to add the “com.unity.render-pipelines.universal”: “9.0.0” which is not released yet, it need be copied from Github.

that’s why you have this problem:

The problem is this - #if ENABLE_HYBRID_RENDERER_V2 && UNITY_2020_1_OR_NEWER && (HDRP_9_0_0_OR_NEWER || URP_9_0_0_OR_NEWER)

These 9_0_0 defines aren’t what I’m using. I’m using 8.

Yeah. I want to use 0.8.0 and am struggling with this.

The performance was great with 0.6 and 0.7. I don’t need a hypothetical performance boost. I also feel I’m bleeding edge enough as it is.

And I don’t even see a 0.9.0 tag on github…

this Condition require ENABLE_HYBRID_RENDERER_V2 which require the URP 9.0.0 or HDRP 9.0.0. but you are in a lower version.

Yeah I don’t want to use that right now. :slight_smile:

1 Like

i hope they will fix everything before the Entities 1.0 (we are not that far), for the current Entities Package Version (0.8) it looks like they didnt even tested it with the Android platform. by switching to it you get a Compile Error in the Entities Package XD.

1 Like

@Opeth001 In addition to everything you’ve done, you need editor version 2020.1b3, which is not released yet:

1 Like

The documentation we shipped with 0.4.0 was outdated. I am trying to resolve this issue ASAP.

IMPORTANT Hybrid Renderer V2 info:

  • You need Unity 2020.1b3. This version has not yet shipped!

  • SRP 9.0.0-preview is required. This package is not yet shipped!

  • SRP: Alternative you can use SRP master branch.

If you don’t have all these requirements, the graphics rendering will be broken or extremely slow. Or both.

Regarding to the shadow map slow down:

We fixed a bug with culling (entities missing far away from camera). This fix revealed a yet unknown bug in the shadow map culling. The result seems to be shadow flickering and performance issues in some scenes. We are investigating why this happens. This bug is likely related to spot light shadow flickering bug that has always been there. We will investigate both issues and try to implement a fix ASAP.

3 Likes

I don’t use Hybrid V2.

V1 has become extremely slow, so thank you very much for the clarification.

I see no problems with shadows in my scene (other than them not getting culled right).

Yes. The culling issue affects both Hybrid V1 and Hybrid V2. We have two engineers working on solving it ASAP. Both the performance is sub-optimal and the result is incorrect. This is an existing old bug, but recent changes make it visible in more cases.

The strange part is, my performance test showed most contents of the scene. :slight_smile: A single model which I was able to render 1000x @ 60fps now eats 20 ms. :slight_smile:

I’ll wait for the update. Maybe I’ll downgrade to Unity 2019.

Hello! I tried to to reproduce this performance issue using our internal test scenes, and I wasn’t able to reproduce it, so probably some specific circumstances are required for it to happen.

Could I ask you to report a bug (Help > Report a Bug), ideally with a repro case? This would make it a lot easier for us to look at this issue in detail and fix it.

1 Like