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

WebGLTextures: Improve RED_INTEGER texture support. #26450

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

RenaudRohlinger
Copy link
Collaborator

This pull request enhances the THREE.WebGLTextures class in three.js to support the use of integer textures in WebGL2. Specifically, it adds conditional handling for the glFormat value of RED_INTEGER, assigning the appropriate internalFormat based on the given glType.

With this enhancement, WebGLTextures now correctly assigns the internalFormat for BYTE, SHORT, INT, UNSIGNED_BYTE, UNSIGNED_SHORT, and UNSIGNED_INT texture types when using the RED_INTEGER format.

@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
643.8 kB (159.6 kB) 644 kB (159.7 kB) +187 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
437 kB (105.8 kB) 437.2 kB (105.8 kB) +187 B

@Mugen87 Mugen87 changed the title Added WebGL2 Integer Texture Support in THREE.WebGLTextures THREE.WebGLTextures: Improve RED_INTEGER texture support. Jul 17, 2023
@Mugen87 Mugen87 changed the title THREE.WebGLTextures: Improve RED_INTEGER texture support. WebGLTextures: Improve RED_INTEGER texture support. Jul 17, 2023
@Mugen87 Mugen87 added this to the r155 milestone Jul 17, 2023
@Mugen87 Mugen87 merged commit 9e580ac into mrdoob:dev Jul 17, 2023
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