这是indexloc提供的服务,不要输入任何密码
Skip to content

Add feature to specify occlusion query precision #3715

@toji

Description

@toji

Noticed by @kainino0x while reviewing a separate issue.

Previously when discussing adding occlusions queries @Kangz closed the issue by saying:

Closing. Occlusion queries (precise and non-precise) have been added to the spec.

Problem is that our spec doesn't have any mechanism for specifying the precision of an occlusion query. After some further investigation I can see that it was originally part of the PR that @haoxli pushed for adding occlusion queries to the spec, but that the preciseOcclusion parameter was removed at @kainino0x's request because we didn't know how we wanted to handle optional parameters at that point. Notably, though, there didn't seem to be any implementation concern behind it's removal, just an editorial question.

As a result, it appears we've accidentally dropped an intended feature. Oops!

(Unfortunately I am unable to find any meeting minutes where occlusion queries were discussed in detail. We've spend a lot more time talking about timestamps and pipeline queries than occlusion, it seems.)

Looking at the native APIs, each has a way of selecting whether you want occlusion results specified as a number of passing fragments (precise) or a simple "did any fragments pass" boolean (non-precise) which may be faster on some hardware.

I know it's late in the API development cycle, but I think this is a straightforward enough capability that we should consider restoring it so we don't lose planned functionality due to an editorial hiccup. If, however, we decide not to restore the ability to specify the query precision we at least need to spec which behavior is treated as the default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU APIfeature requestA request for a new GPU feature exposed in the API

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions