Hey I am having some issues with sunburn performance (Deffered) in my game.I have used 2 profilers (DotTrace mainly) and some custom xbox profiling code and found that on pc ~80% of the time is spent in render of sunburn, On the xbox it is about ~90%.Of this ~85% over 90% is in SynapseGaming.LightingSystem.Effects.BaseSasEffect.SetWorldAndWorldToObject(Matrix&, Matrix&)ands.x.6(GraphicsDevice, SamplerState)Which are inside "SceneInterface.BeginFrameRendering(ISceneState)" and "DeferredRenderManager.Render()"The main issues deepdown are "SynapseGaming.LightingSystem.Effects.BaseSasEffect.SyncTransformEffectData()"And"Microsoft.Xna.Framework.Graphics.TextureCollection.get_Item(Int32)"I have tryed a 3 year old laptop, 4 year old desktop and a 1 year old desktop.Any ideas on how I can improve this?On these machines they can have 120 (300-800 tri) meshes rendering and get less than 15 fps at 720p. Adding SSAO, DOF, Atmosphereic scattering, HDR, 2000 particles (not in sunburn) makes the fps change by less than 1-2 fps. What is TextureCollection.get_Item(Int32) being used for that could make it take up almost 40% of the game by it self? It is obviosly something I am doing wrong... And BaseSasEffect.SetWorldAndWorldToObject(Matrix&, Matrix&) almost uses another 40%...
It sounds like a ton of meshes are being rendered in the scene. This causes the renderer to frequently change the transforms applied to the scene effects, and also frequently run a fix for an XNA 4.0 sampler state issue.
Can you post the SunBurn rendering stats?
Let me know if this helps!
Follow me on Twitter – development and personal tweetsAwesome XNA Videos – Lighting, Rendering, and game videos