Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webgpu can't use multiple materials in a cube #29504

Closed
Justnormalguy opened this issue Sep 26, 2024 · 2 comments
Closed

webgpu can't use multiple materials in a cube #29504

Justnormalguy opened this issue Sep 26, 2024 · 2 comments

Comments

@Justnormalguy
Copy link

Justnormalguy commented Sep 26, 2024

Description

I try the examples in https://threejs.org/manual/#en/textures,but when I replace three.moudle.js to three.webgpu,js ,it doesn't woke. It looks like just like this:
wrong

when I use three.moudle.js it looks correct. :-)
_

Reproduction steps

1.copy the code from https://threejs.org/manual/#en/textures
2.replace three form three.moudle.js to three.webgpu,js
3.replace the image

Code

const scene = new THREE.Scene();

const boxWidth = 1;
const boxHeight = 1;
const boxDepth = 1;
const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);

const cubes = []; // just an array we can use to rotate the cubes
const loader = new THREE.TextureLoader();

const materials = [
new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }),
new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }),
new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }),
new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }),
new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }),
new THREE.MeshBasicMaterial({ map: loadColorTexture('xxx.jpg') }),
];
const cube = new THREE.Mesh(geometry, materials);
scene.add(cube);

Live example

Screenshots

No response

Version

r168

Device

No response

Browser

No response

OS

No response

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 26, 2024

This should be fixed via #29278. Do you mind giving the current dev version a try?

@Justnormalguy
Copy link
Author

Certainly, I'd be happy to have a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants