-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Disable rendering of unseen tilemap layers #1373
Comments
I suggest creating a "render system" for that, on the same models of other systems, specially for custom rendering.
Another option would be to compute a full "should render" map at game start, and update it each time a player remove or add a turf, but we should be careful with that because it involves using server data, fine if can use data already sent, less fine if we have to send some just for that. could also imagine reducing the work load by splitting the computation over multiple frame, first checking tiles very close to player, and then the one further. Putting difficulty hard on this one. Also since we said we're trying to use a bit more bounties, this task probably deserve one. Any other efficient solution is welcomed. |
@stilnat outdated branch used deferred rendering, which has not been ported yet. I believe occlusion culling would be possible with that. |
So I read about deferred rendering, take my words with a pinch of salt because I do not know much about this stuff. I believe deferred rendering does not have any impact on which geometry is rendered. It's a shading screen space method, so it only cares about visible portions of objects, hence maybe the confusion, I'm not sure if this data is easily retrievable. Also according to Wikipedia :
Wikipedia clearly say the technique is used after rendering all geometry, so it should not impact at all the number of rendered vertices. Regarding dynamic occlusion culling, Unity say this :
Our turf object are dynamics, hence there's no built in Unity solution for that. From what I've read about dynamic occlusion culling, it's an open problem, there's no single fit all solution. In our case, we are lucky that our geometry is extremely simple (squares of same size), so the algorithm I suggested above might be enough. |
Summary
If we cant seen them, why render them? Disable rendering of unseen tilemap layers.
Goal
If a tile and all of its 8 neighbors (4 sides + 4 corners) have an occupied "turf" layer, do not render the following layers:
The text was updated successfully, but these errors were encountered: