google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.61k stars 1.86k forks source link

Occlusion Culling #1201

Open nxrighthere opened 5 years ago

nxrighthere commented 5 years ago

Is your feature request related to a problem? Please describe. Objects that can't been seen are still sent to the GPU for rendering but to no visual effect. Lowering the computation costs of occluded objects improves application's performance, but with no impact to the scene quality.

Describe the solution you'd like Software Occlusion Culling based on CPU rasterization of the depth buffer with axis-aligned bounding box tests to determine if an object is occluded.

Hardware Occlusion Culling to cull dynamic geometry in real-time by using a hierarchical depth buffer (generated by the GPU during a depth pre-pass) combined with GPU occlusion queries.

Precomputed Occlusion Culling based on visibility volumes where culling is performed at runtime by checking the cell the camera is currently inside, and retrieving a list of non-occluded meshes.

OS and backend Software and Precomputed Occlusion Culling should be available on all platforms (except SIMD-optimized parts).

Hardware Occlusion Culling is limited to GPU models that supports occlusion queries.

romainguy commented 5 years ago

Thanks for filing this. Occlusion culling is something we've been wanting to do since the beginning it's just not a priority at this point. The first implementation will likely be hardware queries based.

ompadu commented 3 years ago

Hi, any update on this?

pixelflinger commented 3 years ago

No update. We still want to implement some of these solutions.

Nolram12345 commented 1 year ago

... any update now ? Lack of occlusion culling is starting to become a rather large issue in rendering full scenes on modern standards, be it mobile or desktop...

mbalajee commented 1 month ago

Will Occlusion culling help alleviate this issue?

Nolram12345 commented 1 month ago

Unlikely, unless you'd split up the model in multiple sections. Occlusion culling primarily helps when rendering multiple objects, so that objects occluded/"behind" other objects don't get rendered.