Steps to Reproduce

1. Download the test project from the attechment.

2. Open the project with UE 4.21 and 4.23, build android apk.

3. Install the apk on some Mali GPU devices and Adreno GPU devices ,like samsung S6 and samsung s8.

4. Compare the frame rate between the two versions, the 4.23 apk performance is significantly slower than 4.21.

 

We use stencil test to mask out the areas where can receive decals, but it will have a significant performance hit on some mobile devices when doing stencil write and pixel clip at the same time.

Before 4.21 we don't do stencil write if there is no deferred decal in the scene, but in 4.23 we always write stencil buffer no matter there is a deferred decal or not.

I think there are several ways to avoid the issue in 4.23:

  1. Do the same thing as 4.21.
  2. a.Only the primitives can receive decal write stencil buffer with 80

          b.Only the stencil value equals to 80 can pass the stencil test when rendering decal.

          c.Sort the MeshDrawCommands with bReceiveDecals flag first to have them are renderred last

      3.Add a mask depth pre pass and render masked mesh with opaque shader and do depth test using equal func at the mobile base pass.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-81085 in the post.

3
Login to Vote

Won't Fix
ComponentUE - Platform - Mobile
Affects Versions4.23
CreatedOct 1, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021
View Jira Issue