Frustrum culling with displacement issue
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: 4.3.0.2507
Platform(s): Win
Describe the bug
When applying vertex displacement on a mesh (plane rn) it gets culled when the original mesh's bounding box gets outside of the view frustrum, adjusting the bounding box of the mesh from code doesnt seem seem to do anything.
To Reproduce
- Create a mesh (plane for ex)
- add a displacement map to it
- when the pivot of the mesh gets outside of the frustrum, the mesh gets culled, even when there are parts of it that are still visible (cuz of displacement)
- adjust the mesh's bounding box/sphere so it fits the modified mesh
issue persists
EDIT:
the reason for 4. not working could be this part
another solution would be adding a "bypass culling" bool in the render object class, and reading that in the visibility group etc.
(this is kinda whacky tho)
Expected behavior
I thought adjusting the bounding box size to fit the modified mesh would keep it from getting culled.
Screenshots
If applicable, add screenshots to help explain your problem (use GitHub drag & drop)
https://github.com/user-attachments/assets/47570e7b-0483-4cbe-b69b-57d552186866
(this is in the editor ik, but same thing happens in play mode too)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a displaced plane in the editor and in play mode, then trace the render object's bounding-box handling through the visibility group and frustum-culling path. Check why changing the mesh bounds does not affect visibility. Done means displaced geometry remains visible when it extends beyond the original bounds, without unnecessarily disabling culling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100