hierachical z map occlusion culling

Download Hierachical z Map Occlusion Culling

Post on 07-Jul-2015

1.065 views

Category:

Documents

4 download

Embed Size (px)

TRANSCRIPT

  • 1. Hierarchical Z Map Occlusion Culling KASA Study

2. Occlusion Culling . Occluder Occludee 3. Occluder OccludeeOccludee 4. Simple Occlusion Culling Plane() Eye -Near PlaneOcclusion . . . 5. .( ) ! 6. .( ) Occlusion . 7. H/W Occlusion Culling Occluder (Z-Buffer ) Occludee g . D3D9 . D3D9 . D3D11 API D3D9 API . 8. Occluder(raw ) Z-Buffer . Occludee( , ) pixelwrite z-test . GPU . GPU . 9. HW Occlusion Query @D3D9 // Initialize LPDIRECT3DQUERY9 Query pDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, &pQuery); // Begin Test pQuery->Issue(D3DISSUE_BEGIN); // // Drawing // // End Test pQuery->Issue(D3DISSUE_END); // dwPixelCount . DWORD dwPixelCount = 0; pQuery->GetData(&dwPixelCount,sizeof(DWORD), D3DGETDATA_FLUSH); 10. .( .) .( .) 11. . !!! 12. ? DrawCall .( ) . . Occludee Z-Test . Z-Test PCI GPUMemory-> System Memory . 13. Hierarchical Z Map OcclusionCulling - . Occluder Occludee ? () . Z-Buffer . Z-Buffer Z-Buffer / . ? depth . Pixel Shader Compute Shader depth . 14. screen space Occludee Occludee depth . Occludee Z-Buffer . Occludee Z-Buffer . Occludee Z-Buffer . Occludee screen space 2x2 . 15. Z-Buffer 2x2 Occludee Z-Buffer 16. Z-Buffer OccludeeZ-Buffer 17. Z-Buffer 4x4 Z-BufferZ-Buffer 18. 2x2? screen space Occludee . 1x1 screen space Occludee depth . 2x2 . Occludee screen space 1x1 - 2x2 . -> float fLOD = ceil(log2( Width )); 19. - (ex: 512x256) . 1x1 . 512x256 -> 256x128 -> 128x64 -> 64x32 -> 32x16.. 20. - Occluder Mip level 0 Occluder . ->Depth map . 21. Depth map Down sapmling Depth map level 0 level(1x1) . 22. Z-buffer Texturemip chain0 1 2 34 23. Occludee Occludee . Occludee . Compute Shader. 24. (with Compute Shader) screen space Occludee . Occludee screen space . screen space Occludee Z-Map Mip . eye screen space . screen space 2x2 . Depth 2x2 depth . Depth > Depth culling. 25. : screen space Occludee : Occludee z-test mip level 8 depth map .Lv 0 512x256 width 256 .log2(256) = 8 mip level 8 2x1 depth map 26. GPU . D3D11_USAGE_STAGING ,D3D11_CPU_ACCESS_READ copy,CopyResource() . Map(),UnMap() . 27. Occludee Raster Operation . Occludee Z-Test Z-Test . Z-Buffer Texture , bandwidth. 2x2 = 4 depth Depth . GPGPU(Compute Shader) . 28. Occluder . . Culling PCI-E GPU Memory->System Memory . depth . . . 29. < 700>No Occulusion Culling-> 430 FPS, : 376D3DQuery Occlusion Culling-> 561 FPS, : 31Hierarchical Z Map Occlusion Culling-> 713 FPS, : 31 Occludee 30. 31. Compute Shader Thread Group*Thread GPU SP(Core) *Group GPU SM Threads : 256Occludee 256 Group 1 . nVidia GPU SM 4 16 . SM 1 SM .SM 16Threads : 16 , Thread Group : 16 .SM 4Threads : 64 , Thread Group : 4 .Threads per group SM . 32. Occluder1. voxelize.2. Voxel voxel .3. voxel .4. .5. 3 . http://www.nickdarnell.com/2011/06/hierarchical-z-buffer-occlusion-culling-generating-occlusion-volumes/http://www.mpi-inf.mpg.de/~mschwarz/papers/vox-siga10.pdfhttp://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.14.6993 33. http://www.nickdarnell.com/2010/06/hierarchical-z-buffer-occlusion-culling/ 34. Q/A

Recommended

View more >