-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Big FPS drop with Sprite3D as ground and 14 omnilights #2096
Comments
The ground has always had alpha disabled, so that can't be the issue. One diffecrence is that the ground sprite is oriented on Y axis, while all the other game objects are oriented on Z axis. |
Oh wow! You won't believe this! :D If I change the ground sprite to Z axis, the FPS drop is gone. Even with one big Sprite3D for the whole level. Can you fix this? Should be something obvious, right? |
Do you still need a scene or can you reproduce it yourself with this new info? |
No, I truly have no idea what's going on, would really appreciate a test On Mon, Jun 15, 2015 at 12:10 PM, ScyDev notifications@github.com wrote:
|
Ok, working on it. |
This runs at 44 FPS for me. Hide the Ground sprite (or orient to Z axis) and you get 60 FPS. So it seems to me that if the Ground is oriented on Z axis, it receives light from only a few of the sources and that's why that affects performance. So axis orientation is not actually the cause of this problem. But light seems to be very expensive. Roughly 1 FPS lost for every light source. Especially if they all shine on the same sprite, that's why it helped when I made the ground from many small sprites instead of one big one. And having 2 moving light sources seems to eat about 15 FPS all by itself (not in this scene, but in my game I've noticed this). |
Is this the expected performance with lights? |
@ScyDev BTW, what happens when you disable shadows? |
None of the lights in this demo are casting shadows. |
I just found out, I have such extremely low FPS because I lost OpenGL support when I last updated my Ubuntu. However, the huge impact of lights is still there. In certain situations it drops from 2000 to 400 FPS. |
Trying to triage this issue: |
In my example, the grass which is the background for everything else.
I've tried one big Sprite3D (13x26m), but noticed that this eats about 30 FPS in fullscreen, as compared to no visible ground at all.
Then I've tried many smaller sprites (2.6x2.6m) to cover the same area, which eats "only" about 15 FPS, but still way too much...
What is strange is that only the ground makes this huge difference in FPS. All the other sprites in the game seem to hardly make a difference in FPS if I enable or disable them.
All of them, including the ground, are shaded and receive shadows.
The text was updated successfully, but these errors were encountered: