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

a wireframe example #427

Merged
merged 4 commits into from
Jun 19, 2024
Merged

a wireframe example #427

merged 4 commits into from
Jun 19, 2024

Conversation

greggman
Copy link
Collaborator

No description provided.

sample/wireframe/main.ts Outdated Show resolved Hide resolved
return {
vertexBuffer,
indexBuffer,
indexFormat: 'uint32',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we hardcode indexFormat there?
Shall it be part of models.ts returned data OR should it be defined const indexFormat = 'uint32'; like depthFormat below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's there so different models can have different index formats. I get there aren't different formats here but I'd think I'd prefer to leave it as is, it shows a pattern

sample/wireframe/main.ts Outdated Show resolved Hide resolved
layout: 'auto',
vertex: {
module: wireframeModule,
entryPoint: 'vsIndexedU32',
Copy link
Collaborator

Choose a reason for hiding this comment

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

vsIndexedU32 is the only one used in wireframe.wgsl. Shall we consider removing vsUnindexed and vsIndexedU16 and omit entryPoint there when creating wireframePipeline?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed them and just changed them to comments. This isn't production code tho, it's sample code and I think having alternative solutions people can look at is not a bad thing, even if they aren't used.

sample/wireframe/main.ts Outdated Show resolved Hide resolved
sample/wireframe/main.ts Outdated Show resolved Hide resolved
sample/wireframe/utils.ts Outdated Show resolved Hide resolved
sample/wireframe/wireframe.wgsl Outdated Show resolved Hide resolved
sample/wireframe/wireframe.wgsl Outdated Show resolved Hide resolved
sample/wireframe/wireframe.wgsl Outdated Show resolved Hide resolved
sample/wireframe/utils.ts Outdated Show resolved Hide resolved
@greggman greggman enabled auto-merge (squash) June 19, 2024 05:38
@greggman greggman merged commit 73107d8 into webgpu:main Jun 19, 2024
1 check passed
@greggman greggman deleted the wireframe branch June 19, 2024 05:40
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