Skip to content

support enable clip_distances extensionΒ #6236

Open
@EriKWDev

Description

@EriKWDev

Is your feature request related to a problem? Please describe.
I have implemented planar reflections in our engine which would benefit from HW clipping plane support but I currently have to use fragment-shader discard instead. Being able to set the @builtin(clip-distances) output of the vertex shader would fit this perfectly and hopefully be more performant

Describe the solution you'd like
support the clip_distances extension per https://gpuweb.github.io/gpuweb/#dom-gpufeaturename-clip-distances

Describe alternatives you've considered
Not supporting clip_distances, making me sad

Additional context
It seems to my understanding that parsing of the enable directive got mangled up with the implementation of f16 even though there are other extensions that could perhaps be worked on as well:

implementing enable and fp16: #5701
clip-distances discussion for spec: gpuweb/gpuweb#4588
enable directive issue: #5476


To do:

  • Implement
  • Expose in WGSL enable extensions
  • Expose in WebGPU API

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions