Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occlusion culling #10

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Occlusion culling #10

wants to merge 19 commits into from

Conversation

Neo-Zhixing
Copy link
Contributor

@Neo-Zhixing Neo-Zhixing commented Nov 30, 2022

Occlusion culling implementation. We take the z-buffer from last frame, generate a mipmap for it, and for each primitive we can test them against the HiZ buffer and discard them as needed.

Note that the TEXTURE_BINDING usage must be added to bevy when creating the depth texture. This is going to be a separate PR into bevy.

Copy link
Collaborator

@bonsairobo bonsairobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Just needs a few changes.

Cargo.toml Outdated
default-features = false
features = ["bevy_asset", "bevy_core_pipeline", "bevy_render", "x11"]

[patch."crates-io"]
bevy = { path = "../bevy" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should figure out what to do about this. If we need upstream bevy changes, let's make a PR and get this repo pointing to the branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/vertex_pulling/primitive_visibility.rs Outdated Show resolved Hide resolved
src/vertex_pulling/view.rs Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
src/vertex_pulling/vertex_pulling.wgsl Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants