Repository navigation
Conversation
daker
force-pushed
the
webgpu-cubetexture
branch
4 times, most recently
from
October 4, 2026 01:26
ba3733c to
7f407cf
Compare
49 of 56 tasks
daker
force-pushed
the
webgpu-cubetexture
branch
from
October 4, 2026 14:31
7f407cf to
5ca3398
Compare
sankhesh
requested changes
Oct 27, 2026
daker
force-pushed
the
webgpu-cubetexture
branch
2 times, most recently
from
October 27, 2026 09:08
828eb15 to
94439ca
Compare
sankhesh
requested changes
Oct 28, 2026
| const hasNormal = code.includes('var normal:'); | ||
| const ppty = model.WebGPUActor.getRenderable().getProperty(); | ||
| const needLighting = | ||
| ppty.getLighting() && |
Collaborator
There was a problem hiding this comment.
vtkProperty2D has no getLighting(), and this now runs before the !model.is2D guard.
Add the cubeMap flag to vtkTexture. vtkTexture.useCubeMap() tells a backend to upload the texture as a cube map. Six faces without the flag also give a cube map, with a warning. WebGL uses useCubeMap(). In WebGPU, the texture manager uploads the six faces as the six layers of one 2D texture with a 'cube' view. The rows of each face are flipped to match WebGL. Only the diffuse texture uses this path. The shader samples it with the texture coordinates as a vec3 direction. A missing third component is zero. Skybox now uses the cube path of the texture manager. This fixes RGB faces, which Skybox uploaded without RGBA padding. Other changes: - Each face of an interpolated cube map gets a mip chain. - An image larger than the device limit is drawn smaller one time, when the texture is made. - A texture larger than the device limits logs an error, and the texture skips all writes. - RGB data is padded to RGBA only when it is uploaded.
daker
force-pushed
the
webgpu-cubetexture
branch
from
November 9, 2026 11:23
94439ca to
95be37f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Results
Changes
Add a cubeMap flag to vtkTexture (setCubeMap/getCubeMap, default false), The static vtkTexture.useCubeMap() decides if a backend uploads the texture as a cube map: the flag is set and the six input ports have image data, or the six ports have image data without the flag. The second case logs a warning one time for each texture. The flag with a missing face logs an error and gives a 2D texture.
WebGL uses useCubeMap() in place of its six input test, so its behavior does not change.
WebGPU uploads the six faces as the six layers of one 2D texture and samples it through a 'cube' view. The rows of each face are reversed to get the same orientation as WebGL. The cube texture has its own cache key, and the pipeline hash includes the view dimension of each texture. Only the diffuse texture asks for the cube map path, because Background and environment lighting sample 2D textures. The fragment shader samples the diffuse cube map with the vec3 texture coordinates when the bound view is a 'cube' view, so the shader always matches the binding.
PR Checklist