Skip to content

[editorial] Describe the fragment stage of the rendering algorithm#2162

Merged
kvark merged 6 commits intogpuweb:mainfrom
kvark:render-algo
Dec 1, 2021
Merged

[editorial] Describe the fragment stage of the rendering algorithm#2162
kvark merged 6 commits intogpuweb:mainfrom
kvark:render-algo

Conversation

@kvark
Copy link
Copy Markdown
Contributor

@kvark kvark commented Oct 5, 2021

Follow-up to #1610


Preview | Diff

@kvark kvark force-pushed the render-algo branch 2 times, most recently from 52d3845 to 603267a Compare October 5, 2021 18:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 5, 2021

Previews, as seen when this build job started (603267a):
WebGPU | IDL
WGSL
Explainer

@github-actions
Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (681818c):
WebGPU | IDL
WGSL
Explainer

spec/index.bs Outdated

Issue: define barycentric coordinates
Issue: define the depth computation algorithm
framebufferCoords(n) = vector(|vp|.`x` + 0.5×(|n|.x+1)×|vp|.`width`, |vp|.`y` + .5×(|n|.y+1)×|vp|.`height`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
framebufferCoords(n) = vector(|vp|.`x` + 0.5×(|n|.x+1)×|vp|.`width`, |vp|.`y` + .5×(|n|.y+1)×|vp|.`height`)
framebufferCoords(|n|) = vector(|vp|.`x` + 0.5 × (|n|.x + 1) × |vp|.`width`, |vp|.`y` + .5 × (|n|.y + 1) × |vp|.`height`)

Spaces seem more consistent and help distinguish × from x.
Alternatively could use · (·)

Also I think this should specify depth as well? Somewhere the NDC z needs to get mapped to the viewport (https://github.com/gpuweb/cts/blob/main/src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts#L82)

@kvark
Copy link
Copy Markdown
Contributor Author

kvark commented Nov 30, 2021

Thanks for the review! I addressed everything except the depth one.
Frankly tired of keeping this open, will be happy to follow up.

@github-actions
Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (f2038a2):
WebGPU | IDL
WGSL
Explainer

@github-actions
Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (d169dad):
WebGPU | IDL
WGSL
Explainer

@kvark kvark merged commit 8ea3aea into gpuweb:main Dec 1, 2021
@kvark kvark deleted the render-algo branch December 1, 2021 14:17
github-actions bot added a commit that referenced this pull request Dec 1, 2021
…2162)

SHA: 8ea3aea
Reason: push, by @kvark

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Dec 1, 2021
…2162)

SHA: 8ea3aea
Reason: push, by @kvark

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Dec 1, 2021
…2162)

SHA: 8ea3aea
Reason: push, by @kvark

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@kainino0x
Copy link
Copy Markdown
Contributor

Sounds good!

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