gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
12.13k stars 881 forks source link

Use WGSL instead of GLSL in library documentation #2849

Open kpreid opened 2 years ago

kpreid commented 2 years ago

There are a number of items in wgpu whose documentation contain examples using GLSL syntax or other references to GLSL elements. Since WGSL is now the standard shading language for WebGPU, it would be beneficial to readers if these examples were presented first in WGSL. (Keeping the GLSL would still be helpful for new users arriving from WebGL.)

Relevant occurrences of the text "GLSL" in documentation as of commit c36eb9f44bd9462fe176fb859839592131428feb (just after 0.13.1):

Incomplete list (since it's hard to search for) of locations where the documentation refers to GLSL entities without even mentioning GLSL:

Also possibly of interest: the following items mention something like “See the OpenGL specification” but are not about shading language per se and are mostly just declining to explain a topic:

ghost commented 2 years ago

I can work on this.

Sebbl0508 commented 1 year ago

Shouldn't this be closed now?

ghost commented 1 year ago

Maybe, though #2888 technically didn't address everything @kpreid mentioned; it was primarily additive and didn't remove or modify bits where GLSL or OpenGL are mentioned out of context, for example. Remaining items of interest are:

And maybe more.