Linked Questions

16
votes
1answer
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 ...
6
votes
3answers
9k 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 ...
6
votes
2answers
4k 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.
12
votes
1answer
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 ...
10
votes
3answers
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 ...
4
votes
1answer
3k 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 ...
7
votes
2answers
1k views

Question about top down/side scrolling!

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 ...
4
votes
2answers
580 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 ...
4
votes
1answer
924 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 ...
5
votes
2answers
584 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 ...
1
vote
1answer
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 ...
2
votes
1answer
691 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 ...
2
votes
1answer
502 views

SpriteBatch, trying to reduce draw calls

This my main draw call: ...