Search Unity

Problem: HDRP using ForwardTransparent when set to Deferred

Discussion in 'High Definition Render Pipeline' started by brainwipe, Jul 10, 2020.

  1. brainwipe

    brainwipe

    Joined:
    Aug 21, 2017
    Posts:
    78
    My game's framerate is much lower than expected. As you can see below, I'm going for a low poly look and I would expect the framerate to be 100+ on my modern machine 1660Ti GTX.

    I have used the Profiler to understand where my budget is being spent and I spotted that much of it is in the ForwardTransparent pass of the pipeline:



    Note, in the screen grab above I do have one transparent material but I removed that and it made no difference.

    My settings are set to Deferred Only and I've turned off a lot of the bells and whistles:



    In the documentation it says:

    HDRP forces Forward rendering for the following types of Shaders:

    Fabric
    Hair
    AxF
    StackLit
    Unlit
    Lit shader with a Transparent Surface Type​

    If you set the Lit Shader Mode to Deferred in your HDRP Asset, HDRP uses deferred rendering to render all Materials that use an Opaque Lit Material.

    Forward and Deferred rendering both implement the same features, but the quality can differ between them. This means that HDRP works with all features for whichever Lit Shader Mode __you select. For example, Screen Space Reflection, Screen Space Ambient Occlusion, Decals, and Contact Shadows work with a Deferred or Forward __Lit Shader Mode. Although feature parity is core to HDRP, the quality and accuracy of these effects may vary between Lit Shader Modes due to technical restraints​

    I've checked my shader graph shaders and my materials using HDRP/Lit and they are all set to opaque. It made no difference.

    How do I find out what is causing ForwardTransparent to be forced in the pipeline?

    I am running: 2019.4.0f1 and my package versions are:



    Many thanks in advance.
     
  2. tuinal

    tuinal

    Joined:
    Dec 14, 2012
    Posts:
    17
    I'd think the most likely scenario is you've still overlooked a material that is set to transparent.

    The tried and tested method of finding a problem object/material is progressively disabling scene objects and observing the impact on the profiler. It's a bit quicker if you take a binary search approach (i.e. disable half the scene first, then you immediately know which half is causing the problem). If you can narrow it down to a problem object it's usually easier to get help or find a solution.

    I'd note in HDRP whether or not the environment is low-poly is not a major performance factor in deferred rendering. You can render 50 or 2 million+ tris with little performance difference; lighting is a much more significant consideration and it looks from your scene that you have a lot of light sources going on - if they're shadow casting and/or all set to the default fade distance of near-infinity, this can also kill framerate even if the environment geometry is very simple.
     
    brainwipe likes this.
  3. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    68
    Yeaa it looks weird. If you are 100% sure that every surface in the scene is Opaque then you should check it again with frame debugger. It's below Profiler. It should point you to all the forward rendered meshes. All the opaque meshes are below GBuffer step. It gives much better inside into performance than profiler.
     
  4. brainwipe

    brainwipe

    Joined:
    Aug 21, 2017
    Posts:
    78
    Thank you @tuinal and @Wawruch2, I'm glad that I'm not missing anything!

    I'll get my head into the Frame Debugger and then go through all the materials again.