Sitelet https://github.com/gpuweb/gpuweb/issues/312
Skip to content

Should uninitialized depth resources default to 1.0 or 0.0? #312

Description

@kainino0x

1.0 is the typical "far" value, and this is the value chosen by WebGL as well.
But for inverted-z, it would be 0.0. Fortunately, whatever we choose here shouldn't hurt performance for one or the other case, since if the app explicitly clears then it we won't have to do the implicit clear.

As an aside (cc #268 #276), whatever default is chosen here, it may make sense to use it for the clear value default.

Of course, this becomes irrelevant if we end up disallowing the use of uninitialized resources in validation, which IIRC was still on the table.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions