Issue with WebGPU + orthographic camera + scene background texture

Hello

I’m trying to convert a few three.js projects from WebGL to WebGPU, but now I’m having an issue if I use an orthographic camera (instead of a perspective one) together with a texture in the scene background.

When I use a perspective camera, the background texture looks fine. It will fill the entire canvas, as expected:

https://www.dei.isep.ipp.pt/~jpp/webGPU/cube1/cube.html

But if I decide to use an orthographic camera, the texture will only fill part of the screen (a circle!):

https://www.dei.isep.ipp.pt/~jpp/webGPU/cube2/cube.html

I’m using the most recent three.js revision (r181).

Could you please help? Thanks in advance.

This looks like a bug in the WebGPURenderer. Do you mind filing an issue at GitHub?

You can share the following fiddle as an editable live example that demonstrates the bug: three.js dev template - module - JSFiddle - Code Playground

1 Like

No need for the issue. I have directly filed a PR:

3 Likes

Thanks for your help! :slight_smile: