(Copy from https://bitbucket.org/rude/love/issue/5 ... mage-64x64)
Accelerator in Use: Mobile Intel(R) 965 Express Chipset Family
Driver Version: 6.14.10.5218
Operating System: Windows XP* Professional, Service Pack 3 (5.1.2600)
Image size = 64x64
FPS with SpriteBatch == FPS without SpriteBatch
What's the use?
Test scene:
https://bitbucket.org/rude/love/issue-a ... Batch.love
[RESOLVED][0.8.0]SpriteBatch work slow with big image(64x64)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- AntonioModer
- Party member
- Posts: 202
- Joined: Fri Jun 15, 2012 5:31 pm
- Location: Belarus
- Contact:
[RESOLVED][0.8.0]SpriteBatch work slow with big image(64x64)
Last edited by AntonioModer on Mon Dec 17, 2012 8:04 pm, edited 1 time in total.
Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and
You're drawing 10,000 sprites. I get an increase in fps (about 15) when switching, fps isn't always the greatest benchmark. When will you ever need 10,000 sprites?
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and
See my comment on your issue in the love source tracker.
In other words: "Why doesn't my budget GPU perform well when I do something silly?"slime wrote:You are drawing 10,000 overlapping sprites on the screen at once. Because the sprites use color blending, your GPU probably has to output a pixel for every single texel on every single sprite, regardless of whether it's visible in the final output or not.
Because of overdraw and blending, your GPU is processing up to 40,960,000 output pixels per frame, even though the screen size is only 480,000 pixels (that's a factor of 85x more pixels.) This is not a problem with spritebatches, it's a problem with what you're using them for.
Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and
You're drawing the sprites with the same texture.
Batching these has little performance benefit.
Batching these has little performance benefit.
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and
That's not true.Ruirize wrote:You're drawing the sprites with the same texture.
Batching these has little performance benefit.
Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and
I'm using about 10000 sprites in my game. I have this grass texture of 256x256 px. With a size of 1 m equal to 10 px, i need to cover the area of 2 km. I think, maybe I have no performance issues because 99% of the sprites are being "drawn" outside the visible window, so the GPU automatically does not render them. Anyway, recently I switched to quad + image wrapping, which is said to be even faster.
- AntonioModer
- Party member
- Posts: 202
- Joined: Fri Jun 15, 2012 5:31 pm
- Location: Belarus
- Contact:
Re: [0.8.0] "SpriteBatch" work slow with big image(64x64 and
I understand this finally. And I made an example "spriteBatchExampleCorrect".
https://bitbucket.org/rude/love/issue-a ... rrect.love
explanation:
1. posting.php?mode=reply&f=4&t=12056#pr72198
2. my: Sprites should not overlap
Thank you slime
https://bitbucket.org/rude/love/issue-a ... rrect.love
explanation:
1. posting.php?mode=reply&f=4&t=12056#pr72198
2. my: Sprites should not overlap
Thank you slime
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests