Skip to main content
GameDev.net gamedev.net
🔒 Locked

How to use ID3D11Predicate for occlusion testing?

Started by DKrz May 28, 2022 at 1:39 PM 0 replies 3.8k views
Original Post
DKrz
DKrz

Hello, can anyone help me with setting up ID3D11Predicate for occlusion testing? I know how to do it for ID3D11Query, e.g. create an ID3D11Query object then every frame I render meshes/AABBs to depth buffer - then on the next pass I wrap Begin and End methods of immediate context around the method of drawing each of the same meshes and 2 frames down the line I retrieve the result from GetData per mesh by which I decide whether to add those meshes to render queue this frame or not. Simple. But with that latency of 2 frames.

As I take it ID3D11Predicate does away with the latency but how to set it up? MSDN docs aren't clear enough to me and there are no examples on the Internet that I could find.

So I create an ID3D11Predicate object with CreatePredication but what then?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.