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

WebGPURenderer: Fix uniform update tests #28698

Merged
merged 2 commits into from
Jun 19, 2024
Merged

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Jun 18, 2024

Description

This PR fixed a precision issue that had been detected for a while, the uniforms were always updated because the default numerical precision of JS is 64-bit, while the comparison buffer is 32-bit, which resulted in something like

console.log( new Float32Array( [ Math.PI ] )[ 0 ] === Math.PI ); // false

// instead of
console.log( [ Math.PI ][ 0 ] === Math.PI ) // true

@sunag sunag changed the title WebGPURenderer: WebGPURenderer: Fix uniform update tests Jun 18, 2024
@sunag sunag added this to the r166 milestone Jun 18, 2024
@sunag sunag marked this pull request as ready for review June 19, 2024 01:45
@sunag sunag merged commit 074afc1 into mrdoob:dev Jun 19, 2024
11 checks passed
@sunag sunag deleted the dev-fix-updates branch June 19, 2024 01:48
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.

1 participant