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

GFX & Shader Documentation #472

Merged
merged 2 commits into from
Jan 12, 2023
Merged

GFX & Shader Documentation #472

merged 2 commits into from
Jan 12, 2023

Conversation

guusw
Copy link
Member

@guusw guusw commented Dec 1, 2022

Preview

Document GFX shards:

  • BuiltinFeature
  • Draw
  • Drawable
  • DrawablePass
  • DrawQueue
  • Feature
  • glTF
  • Render
  • UIPass

@guusw guusw marked this pull request as draft December 1, 2022 14:42
@guusw guusw self-assigned this Dec 3, 2022
@guusw guusw force-pushed the guus/gfx-docs branch 2 times, most recently from a03cf67 to 205884d Compare December 5, 2022 16:01
@guusw guusw marked this pull request as ready for review December 5, 2022 16:34
@guusw
Copy link
Member Author

guusw commented Dec 5, 2022

Opening it now for review since it might get too big. Since this also contains a bunch of technical fixes/changes.

I still plan to continue documenting the rest of the graphics shards, add more samples & add more details on some topics.

@ChelseaChX
Copy link
Contributor

Looks good! Going forward we should be trying to standardize the writing of docs for Shards. Wire and Mesh are Shard specific terms and should have their first letter capitalized to distinct them from regular wires / meshes. We'll have to clean up on the punctuation too to make our docs seem less sloppy. Thanks for helping with the docs on the UI / GFX shards, as well as streamlining the shards doc pages to make it easier to peruse.

@guusw guusw marked this pull request as draft December 6, 2022 08:08
Copy link
Contributor

@Kryptos-FR Kryptos-FR left a comment

Choose a reason for hiding this comment

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

There are too many changes that are unrelated with each others. Some may be based on misconception on how the documentation is generated.

The list of samples in generated doc is broken: the   was required to separate groups of Code/Output.

help ()shouldn't have any markdown or HTML (or even line return) in it as it will be used by the visual scripting and it is undecided at this stage if we will support markdown there (or another syntax). That's why we have the Details section, where more "complex" documentation can be manually written.

Please split into several PRs, starting with all the changes related to GFX code being separate, then every new doc feature being also separate so we can select the one we want.

  • PR related to search
  • PR related to reformatting the input/output/parameter into a single table (for which I don't see why we need HTML, as markdown is capable of doing tables)

Also at this stage, I wouldn't move any pages around since this is still a work in progress. That should be part of another PR and ongoing discussion.

There are good changes like the generation of enum pages. But I'd rather we review those separately.

@guusw guusw changed the title Documentation improvements GFX & Shader Documentation Dec 6, 2022
@guusw guusw mentioned this pull request Dec 6, 2022
10 tasks
docs/docs/reference/shards/UI/index.md Outdated Show resolved Hide resolved
docs/mkdocs.yml Outdated Show resolved Hide resolved
docs/mkdocs.yml Outdated Show resolved Hide resolved
src/extra/gfx/feature.cpp Outdated Show resolved Hide resolved
src/extra/gfx/feature.cpp Outdated Show resolved Hide resolved
@guusw guusw marked this pull request as ready for review January 6, 2023 12:10
@guusw
Copy link
Member Author

guusw commented Jan 6, 2023

Rebased & cleaned up

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #472 (63f5c64) into devel (c5f438b) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##            devel     #472      +/-   ##
==========================================
- Coverage   81.22%   81.22%   -0.01%     
==========================================
  Files         219      219              
  Lines       29183    29183              
==========================================
- Hits        23705    23703       -2     
- Misses       5478     5480       +2     
Impacted Files Coverage Δ
src/extra/gfx/feature.cpp 79.44% <50.00%> (ø)
src/core/shards/flow.hpp 87.84% <0.00%> (-0.16%) ⬇️
src/core/shards/wasm.cpp 49.84% <0.00%> (-0.16%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@Kryptos-FR Kryptos-FR left a comment

Choose a reason for hiding this comment

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

LGTM.

Just a remark regarding documenting the enums.

Comment on lines +22 to +28
ENUM_HELP(gfx::BuiltinFeatureId, gfx::BuiltinFeatureId::Transform, SHCCSTR("Add basic world/view/projection transform"));
ENUM_HELP(gfx::BuiltinFeatureId, gfx::BuiltinFeatureId::BaseColor,
SHCCSTR("Add basic color from vertex color and (optional) color texture"));
ENUM_HELP(gfx::BuiltinFeatureId, gfx::BuiltinFeatureId::VertexColorFromNormal, SHCCSTR("Outputs color from vertex color"));
ENUM_HELP(gfx::BuiltinFeatureId, gfx::BuiltinFeatureId::Wireframe, SHCCSTR("Modifies the main color to visualize vertex edges"));
ENUM_HELP(gfx::BuiltinFeatureId, gfx::BuiltinFeatureId::Velocity,
SHCCSTR("Outputs object velocity into the velocity global & output"));
Copy link
Contributor

Choose a reason for hiding this comment

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

@ChelseaChX Should we have a final . for those help strings? I added one on my own enum description since we also had those on the regular help() function.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I think we have them everywhere else in help strings, can add them here.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ChelseaChX Should we have a final . for those help strings? I added one on my own enum description since we also had those on the regular help() function.

Yeah we should keep it consistent.

Copy link
Member

@sinkingsugar sinkingsugar left a comment

Choose a reason for hiding this comment

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

Good as a starting point I guess. But needs way more love.

@guusw
Copy link
Member Author

guusw commented Jan 11, 2023

@sinkingsugar Yeah not complete yet, but I'll open a new PR for the remaining docs

@sinkingsugar sinkingsugar merged commit ea94e7e into devel Jan 12, 2023
@sinkingsugar sinkingsugar deleted the guus/gfx-docs branch January 12, 2023 02:50
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.

4 participants