Skip to content

Clean up webgpu_compute_cloth example#31130

Merged
Mugen87 merged 1 commit into
mrdoob:devfrom
WestLangley:dev-cloth
May 20, 2025
Merged

Clean up webgpu_compute_cloth example#31130
Mugen87 merged 1 commit into
mrdoob:devfrom
WestLangley:dev-cloth

Conversation

@WestLangley

@WestLangley WestLangley commented May 18, 2025

Copy link
Copy Markdown
Collaborator

This PR changes the material color so the sheen is readily apparent.

@WestLangley WestLangley added this to the r177 milestone May 18, 2025
@WestLangley WestLangley changed the title Clean up of webgpu_compute_cloth Clean up webgpu_compute_cloth example May 19, 2025
@WestLangley

Copy link
Copy Markdown
Collaborator Author

There is a design problem that will have to be addressed in another PR.

The material color set in the GUI does not match the rendered material color.

@Mugen87

Mugen87 commented May 19, 2025

Copy link
Copy Markdown
Collaborator

Instead of:

materialFolder.addColor( clothMaterial, 'color' );

try it with:

materialFolder.addColor( { color: clothMaterial.color.getHex( THREE.SRGBColorSpace ) }, 'color' ).onChange( value => clothMaterial.color.set( value ) );

Same for the sheen color.

@WestLangley

Copy link
Copy Markdown
Collaborator Author

try it with:

That results in rounding problems in my testing.

Compare with the approach used by the matcap example.

@Mugen87 Mugen87 merged commit ed4a0fe into mrdoob:dev May 20, 2025
11 checks passed
@WestLangley WestLangley deleted the dev-cloth branch May 23, 2025 04:03
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
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

Successfully merging this pull request may close these issues.

2 participants