I'm converting my old school sidescrolling game
I'm having some troubles in the performances but the biggest problem now is the unability to set TextureAddressMode to Wrap.
Obviously i can create a workaround for this, but it will cost a lot performance-wise. Is there any way to draw repeated textures in Silversprite?
Statics.spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None);
#if !ZUNE && !SILVERLIGHT
Statics.device.SamplerStates.AddressU = TextureAddressMode.Wrap;
Statics.device.SamplerStates.AddressV = TextureAddressMode.Wrap;
currentSkyRect.X = (int)(Statics.camX/20f);
Statics.spriteBatch.Draw(sky, baseSkyRect, currentSkyRect, Color.White);
This is the incriminated part...
Apr 11, 2010 at 10:16 PM
Silverlight doesn't support tiling so it would be hard to do this, but it may be possible with a pixel shader. Pixel shaders in Silverlight run on the CPU but it would probably still be faster than doing it with a bunch of sprites. I haven't heard any other
requests for this yet, please post a request here:
I'm using the votes on that list to determine what's most important to work on next.