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

Use WGSL instead of GLSL in library documentation #2849

Closed
kpreid opened this issue Jul 4, 2022 · 3 comments
Closed

Use WGSL instead of GLSL in library documentation #2849

kpreid opened this issue Jul 4, 2022 · 3 comments
Labels
area: documentation Documentation for crate items, public or private good first issue Good for newcomers help required We need community help to make this happen. type: enhancement New feature or request

Comments

@kpreid
Copy link
Contributor

kpreid commented Jul 4, 2022

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 c36eb9f (just after 0.13.1):

  • Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING
  • Features::UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING
  • BufferBindingType
  • BindingType
  • StorageTextureAccess
  • TextureSampleType
  • TextureViewDimension

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

  • PipelineLayoutDescriptor refers to "set = 0" which is GLSL syntax.
  • BindingType::Texture::multisampled refers to GLSL texture sampling functions.
  • Features::TEXTURE_BINDING_ARRAY and BUFFER_BINDING_ARRAY have GLSL examples.

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:

  • BlendFactor
  • BlendState
  • BindingType::StorageTexture
  • SamplerBindingType
@cwfitzgerald cwfitzgerald added type: enhancement New feature or request help required We need community help to make this happen. good first issue Good for newcomers area: documentation Documentation for crate items, public or private labels Jul 6, 2022
@ghost
Copy link

ghost commented Jul 15, 2022

I can work on this.

@ghost ghost mentioned this issue Jul 15, 2022
9 tasks
@Sebbl0508
Copy link

Shouldn't this be closed now?

@ghost
Copy link

ghost commented Jan 27, 2023

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:

  • BindingType::Texture::multisampled
  • BindingType::StorageTexture
  • BlendFactor
  • BlendState
  • PipelineLayoutDescriptor
  • SamplerBindingType

And maybe more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Documentation for crate items, public or private good first issue Good for newcomers help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants