Skip to content

Cannot reliably specify depth biases with depth24plus #6350

Description

@magcius

https://gpuweb.github.io/gpuweb/#ref-for-dom-gputextureformat-depth24plus says:

The depth component of the "depth24plus" and "depth24plus-stencil8" formats may be implemented as either a 24-bit depth value or a "depth32float" value.

https://gpuweb.github.io/gpuweb/#abstract-opdef-biased-fragment-depth says:

If format is a unorm format:

Let bias be (float)state.depthBias * r + state.depthBiasSlopeScale * maxDepthSlope.

Otherwise, if format is a float format:

Let bias be (float)state.depthBias * 2^(exp(max depth in primitive) - r) + state.depthBiasSlopeScale * maxDepthSlope.

Since it is unclear whether depth24plus is a unorm format or a float format, it is impossible to reliably specify depth biases that work. It is also not possible to query whether depth24plus is backed by a unorm format or a float format, as far as I'm aware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU API

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions