Dx12 occlusion query

https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12PredicationQueries/src/D3D12PredicationQueries.cpp

dx12 de oc query

用了新的 predication

https://docs.microsoft.com/en-us/windows/desktop/direct3d12/predication

画geometry的时候 开predication

由gpuquery的结果 (用bounding box画过)来决定画哪个像素

画这个boundingbox的时候 如果box所在像素被其它物体遮住了结果用queryresult返回 那开predication的时候这个像素像素就不画了

这里的数据同步 用了i 个barrier 并不需要fence 

并且用的是前一帧的结果这样在两帧数据差异大的时候 (切换镜头)会有bug

猜你喜欢

转载自www.cnblogs.com/minggoddess/p/9931468.html