Rust-GPU / Rust-GPU/rust-gpu

Make the doc so that it explains Rust-GPU as something in itself, not by comparing to other GPU languages (like GLSL)

Offen
#248 3 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
Vorherrschende Sprache
Rust
Sterne
3.4k
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'll start of by saying that I am familiar with Rust, know a bit about how GPU work but have not programmed on GPU ever before, as that can explain some of the remarks I'm about to make.

My problem

I was reading through The Dev guide on writing shaders. I know there are other issues describing the fact that the doc is old / kinda obsolete, but I wanted to touch on something else.

The doc seems to make a lot of assumptions on previous knowledge of those reading said doc, this is apparent in multiple places:

  • some terms of SPIRV are not really explained. I know there are a few links to the SPIRV doc, but that doesn't really tell me what those are used for, in particular the spirv_headers
  • comparison to terms of OpenGL, DX, glsl

In particular on this second point, this is nice for people that have knowledge of those other languages; but for people like me that do not have this knowledge, it does not suffice as an explanation. For example, when explaining the flat keyword:
"The flat attribute corresponds to the flat keyword in glsl - in other words, the data is not interpolated across the triangle when invoking the fragment shader."
I can kinda understand what that means, but it's a bit succinct.

Some other keywords are explained less than this:
"The invariant attribute corresponds to the invariant keyword in glsl. It can only be applied to output variables."
This doesn't tell me much about what that is.

Now, I understand that this is very much a work in progress, and that for early adopters previous knowledge might be required to be able to get into it. However, on the website for rust-gpu, one of the first paragraphs states:
"There is no longer a need to learn a GPU-specific programming language. You can write both CPU and GPU code in Rust, leveraging your existing Rust knowledge and maintaining a consistent development experience"
With that goal in mind, i think it would be good to write the doc in a way that doesn't assume previous knowledge of other GPU languages. Of course, keeping the comparison with other GPU languages is a good thing, more information on that is not a bad thing.

Ideas

  • Explain some terms on their own, not through comparison only
  • For shaders it would be nice to have images (to be able to see the influence of one thing or another in the code)
  • Adding more links to external resources where needed (as writing doc can be time consuming, and if it's already explained somewhere else...)

I have given a few examples, but I can provide the complete list of places I think could be improved if that is something the people working on this are interested in.

If this is more of a case of "it's too early for people without previous knowledge to start using", then feel free to close the issue, but I would very much like to try to use on my own projects (namely a ray tracer I wrote a year back and that i would like to use GPU on).

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem verlinkten Dev guide zum Schreiben von Shadern, insbesondere mit seinen Erklärungen zu SPIR-V-Begriffen und Shader-Attributen wie flat und invariant. Identifiziere Stellen, die auf Vergleiche mit GLSL, OpenGL oder DirectX zurückgreifen, und überarbeite dann die Dokumentation so, dass Rust-GPU-Konzepte unabhängig erklärt werden, während nützliche Vergleiche und Links erhalten bleiben; die vorgeschlagenen Shader-Bilder und externen Ressourcen sind optionale Ideen für spätere Arbeiten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
computer-graphics, documentation
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.