public void PreDrawnPhase(Microsoft.Xna.Framework.GameTime gt, PloobsEngine.SceneControl.IWorld mundo, PloobsEngine.SceneControl.IObject obj, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights, PloobsEngine.SceneControl.RenderHelper render)
 {
     Vector3 pos =  obj.PhysicObject.Position;             
     render.PushRasterizerState(d);
     render.RenderSceneToTextureCube(RenderTargetCube,
         Color.AliceBlue, mundo, ref pos, gt, true, false, new List<PloobsEngine.SceneControl.IObject>() { obj });
     render.PopRasterizerState();
 }
        public override void PosDrawPhase(GameTime gt, PloobsEngine.SceneControl.IObject obj, PloobsEngine.SceneControl.RenderHelper render, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights)
        {
            render.PushRasterizerState(cullMode);
            render.PushBlendState(BlendState.NonPremultiplied);
            alphagradative.Parameters["camCenter"].SetValue(cam.Position);

            for (int i = 0; i < obj.Modelo.MeshNumber; i++)
            {
                BatchInformation[] bi = obj.Modelo.GetBatchInformation(i);

                for (int j = 0; j < bi.Count(); j++)
                {
                    alphagradative.Parameters["colorMap"].SetValue(obj.Modelo.getTexture(TextureType.DIFFUSE, i, j));
                    Matrix w1 = Matrix.Multiply(obj.WorldMatrix, bi[j].ModelLocalTransformation);
                    alphagradative.Parameters["wvp"].SetValue(w1 * cam.ViewProjection);
                    alphagradative.Parameters["w"].SetValue(w1);

                    render.RenderBatch(bi[j], alphagradative);
                }
            }
            render.PopBlendState();
            render.PopRasterizerState();         
        }