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

Update to vertex format handling and morphing on WebGPU #5319

Merged
merged 1 commit into from
May 11, 2023

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented May 11, 2023

Fixes #5262

Changes:

  • WebGPU implementation now handles normalized vertex element formats
  • modification to texture based morphing on WebGPU to use uint32 vertex Ids and texture fetch to sample morph target textures, to avoid problems with float conversion / half pixel offset

MeshMorphMany example has been changes to use a morph-stress-test example instead of procedural geometry, and it reveals issues in a cleaner way. The example has been disabled for WebGPU temporarily, due to the issues with vertex-id buffer passing to GPU and will be fixed separately.

Screenshot 2023-05-11 at 11 53 16

@mvaligursky mvaligursky self-assigned this May 11, 2023
@mvaligursky mvaligursky added the area: graphics Graphics related issue label May 11, 2023
@mvaligursky mvaligursky mentioned this pull request May 11, 2023
@mvaligursky mvaligursky merged commit c6b219c into main May 11, 2023
@mvaligursky mvaligursky deleted the mv-vertex-format-and-morph branch May 11, 2023 11:25
Comment on lines +34 to +40
#ifdef WEBGPU
ivec2 morphUV = getTextureMorphCoords();
vec3 morphNormal = texelFetch(morphNormalTex, ivec2(morphUV), 0).xyz;
#else
vec2 morphUV = getTextureMorphCoords();
vec3 morphNormal = texture2D(morphNormalTex, morphUV).xyz;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation here looks inconsistent.

Copy link
Contributor Author

@mvaligursky mvaligursky May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mesh decals example issue - incorrect colors on WebGPU
3 participants