FSO.LotView.Utils._3DWorldBatch.RenderSpriteList C# (CSharp) Method

RenderSpriteList() private method

private RenderSpriteList ( List<_3DSprite> sprites, Effect effect, EffectTechnique technique ) : void
sprites List<_3DSprite>
effect Microsoft.Xna.Framework.Graphics.Effect
technique Microsoft.Xna.Framework.Graphics.EffectTechnique
return void
        private void RenderSpriteList(List<_3DSprite> sprites, Effect effect, EffectTechnique technique)
        {
            //TODO: multiple types of 3dsprite. This was originally here to group meshes by texture,
            //but since passing a texture uniform is less expensive than passing >16 matrices we now group
            //by avatar anyways. Other 3d sprites might include the roof, terrain, 3d versions of objects??
            //(when we come to 3d reconstruction from depth map)

            effect.CurrentTechnique = technique;
            ApplyCamera(effect);
            effect.Parameters["SoftwareDepth"].SetValue(FSOEnvironment.SoftwareDepth);
            foreach (var pass in technique.Passes)
            {
                foreach (var geom in sprites)
                {
                    if (OBJIDMode) effect.Parameters["ObjectID"].SetValue(geom.ObjectID / 65535f);
                    if (RoomLights != null)
                    {
                        var col = RoomLights[geom.Room].ToVector4() * geom.Color.ToVector4();
                        effect.Parameters["AmbientLight"].SetValue(col);
                    }
                    /*if (geom.Geometry is Avatar)
                    {
                        Avatar mG = (Avatar)geom.Geometry;
                        if (mG.BoneMatrices != null) effect.Parameters["SkelBindings"].SetValue(mG.BoneMatrices);
                    }*/
                    effect.Parameters["World"].SetValue(geom.World);
                    pass.Apply();

                    geom.Geometry.DrawGeometry(this.Device, effect);
                }
            }
            effect.Parameters["SoftwareDepth"].SetValue(false); //reset this for non-world purposes
        }