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

WebGLPrograms: UV attributes now depend on used channels, not geometry attributes. #27608

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 22, 2024

Fixed #27552.

Description

After some thinking about #27552, I think this PR improves the way the renderer currently defines the uv attributes 1-3.

With the new code, the actual active texture channels enable uv attributes, not the available data in the geometry object. This should lead to a more graceful handling of assets with missing uv data by avoiding shader compilation errors (see #27552 (comment)).

@Mugen87 Mugen87 marked this pull request as ready for review January 22, 2024 12:31
@Mugen87 Mugen87 added this to the r161 milestone Jan 22, 2024
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
673.5 kB (167.2 kB) 673.5 kB (167.2 kB) +5 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
454.2 kB (110.1 kB) 454.2 kB (110.1 kB) +6 B

@Mugen87 Mugen87 merged commit 74aa7bd into mrdoob:dev Jan 23, 2024
12 checks passed
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.

Inconsistent behaviour when non-existing UV indices are accessed
1 participant