Skip to content

Position: Blessing a single human-writable shading language #41

@litherum

Description

@litherum

We should bless a single human-writable shading language. This is because of the community and ecosystem that is possible when most authors are writing in the same language. We’ve seen this in many places, the most visible of which is probably sites like Shadertoy, which is no the de-facto place where graphics programmers share new ideas and algorithms, including academic research and published papers. Widespread adoption of WebGPU will be hampered if teachers and influencers don’t have a language to spread.

This doesn’t mean that other languages will be forbidden. Instead, this is about the idea that one language will be promoted for documentation, teaching, marketing, etc.

The blessed language should be Secure HLSL. This is for a few reasons:

  • Compatibility: The majority of shaders in the world are written in HLSL, and almost all of them will be compatible with Secure HLSL. This will decrease the burden of porting an application to WebGPU.
  • Security: Secure HLSL has as strong, or stronger, security guarantees than already exist on the Web. The WebGPU Community Group is pursuing efforts to prove this with a static proof solver.
  • Expressivity: Secure HLSL includes facilities for generics and limited pointers, which makes it more suitable for GPGPU algorithms and CPU algorithms ported to the GPU.
  • Portability: The WebGPU Community Group is authoring a full specification which defines every operation. This includes full rules about variable scoping, every standard library function, overload priority resolution, among others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions