Skip to content

Some maps cause low performance #33080

Description

@MrYang614

Description

My r183 webgpu project has low performance than webgl.
I spent some time conducting comparative experiments and identified the root cause of the issue.

In webgpu renderer , normalMap and aoMap will cause the gpu overload and lose many frames ( i am not sure other maps can cause the same problem , I think there's a high probability of that happening.)

Reproduction steps

  1. r183 webgpu render
  2. load gltf with aoMap or normalMap
  3. change the window size can magnify this problem
  4. observe the scene or open F12 performance record.

I can not provide the live example because the model is property of the company
I provide some screenshots helps find the root of the problem

Code

			new GLTFLoader().load('./models/gltf/建筑外立面.glb', function (gltf) {

				scene.add(gltf.scene);

				gltf.scene.children.forEach(child => {
					child.traverse(node => {
						if (node.isMesh) {
                                                        // the model with aoMap and normalMap , this 2 line can open or close the problem.
							node.material.aoMap = null
							node.material.normalMap = null
						}
					})
					t.push(child)
				});

			});

Live example

Screenshots

  1. webgpu set aoMap and normalMap
Image 2. webgpu set aoMap and normalMap null Image 3. webgpu set aoMap and normalMap and change window size Image 4. webgpu set aoMap and normalMap null and change window size Image 5. webgl set aoMap and normalMap Image

Version

183

Device

Desktop

Browser

Edge

OS

Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions