Linked Questions

16 votes
1 answer
3k views

The practical cost of swapping effects

I use XNA for my projects and on those forums I sometimes see references to the fact that swapping an effect for a mesh has a relatively high cost, which surprises me as I thought to swap an effect ...
sebf's user avatar
  • 2,664
6 votes
3 answers
10k views

XNA, SpriteBatch: Slow when rendering lots of sprites?

I've just now tested rendering a lot of sprites using XNA's SpriteBatch class. What I basically do is this: Somewhere in the code, I have a list which contains all sprites that have to be rendered. I ...
TravisG's user avatar
  • 4,422
7 votes
2 answers
5k views

What kind of culling does XNA do for me?

Which kinds of culling and clipping does XNA do for me as default, and which kinds does it not? Z-culling? Backface culling? etc.
Mathias Lykkegaard Lorenzen's user avatar
13 votes
1 answer
2k views

Information about rendering, batches, the graphical card, performance etc. + XNA?

I know the title is a bit vague but it's hard to describe what I'm really looking for, but here goes. When it comes to CPU rendering, performance is mostly easy to estimate and straightforward, but ...
Aidiakapi's user avatar
  • 255
11 votes
3 answers
5k views

Efficient Method of Rendering Massive Terrain in XNA

I'm creating an XNA game that requires a huge space for players. Currently, the test heightmap I'm using is 4096x4096, and is saved as a 4-bit BMP. What I'm trying to do is take that huge heightmap ...
sammarks's user avatar
  • 213
4 votes
1 answer
4k views

XNA how to draw some sprites tiled/wrapped and others not?

I already have: mySpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend); and take care to draw all my sprites in order. I now want to draw some ...
markmnl's user avatar
  • 619
7 votes
2 answers
2k views

How to implement large scrolling background image without tiles?

I know that its just the background that scrolls and the player pretty much stays centered. What I am wondering what technique is more correct when I am implementing a large side scrolling map (I am ...
bitbitbot's user avatar
  • 319
4 votes
2 answers
640 views

Rendering everything with a shader when only squares are needed?

I am building a game that is tile-based (filled with glowy vector squares). Right now, I am considering using instancing for drawing these, but I would like to know if there is a faster approach. The ...
Mathias Lykkegaard Lorenzen's user avatar
4 votes
1 answer
1k views

Using raw vertex information for sprites rather than SpriteBatch in XNA

I have been wondering whether using SpriteBatch is the best option. Obviously for prototyping or small games it works well. However, I've been wanting to apply techniques such as shaders and lighting ...
PrettyPrincessKitty FS's user avatar
1 vote
1 answer
3k views

Efficient Way to Draw Grids in XNA

So I am working on a game right now, using Monogame as my framework, and it has come time to render my world. My world is made up of a grid (think Terraria but top-down instead of from the side), and ...
sm81095's user avatar
  • 543
5 votes
2 answers
616 views

Efficiency of the SpriteBatch

Does SpriteBatch in XNA draw to the screen only when a sprite would appear on the screen? Say I have 5 identical sprites placed exactly on top of each other, is SpriteBatch able to determine that ...
riv_rec's user avatar
  • 259
2 votes
1 answer
800 views

Frustum culling with third person camera

I have a third person camera that contains two matrices: view and projection, and two Vector3's: camPosition and camTarget. I've read up on frustum culling and it makes it seem easy enough for a first ...
Christian Frantz's user avatar
2 votes
1 answer
905 views

SpriteBatch, trying to reduce draw calls

This my main draw call: ...
user avatar