Q: [XNA]Drawing a simple transparent plane I'm working with XNA and a have a problem.
A basic problem, but argh !!! 
I want to draw a ocean, BASIC ocean, just a plane, blue and transparent.
just a plane.
I have try with Vertex, with models and textures.
How tha alpha channel work in XNA ? StencilState, DepthBuffer, nothing would work.
Can you explain how to do this ?
   Use VertexPositionColor enough ?
Excuse me, but I am looking for a long time.
class Ocean
{
    Effect shader0;

    public Vector3 Position;
    GraphicsDevice Graphics;
    Camera camera;
    Model Mesh;


    Texture2D waterTexture;
    Rectangle screen;
    Texture2D test;



    public Ocean(Vector3 pos, int size, GraphicsDevice gra, Camera cam, ContentManager content)
    {

        Graphics = gra;
        shader0 = content.Load<Effect>("Ocean");
        //shader0 = new BasicEffect(this.Graphics);
        waterTexture = content.Load<Texture2D>("Images/shaderUnderwater");


        screen = new Rectangle(0, 0, this.Graphics.Viewport.Width, this.Graphics.Viewport.Height);
        Position = pos;


        Mesh = content.Load<Model>("Models/ocean");

        camera = cam;

        foreach (ModelMesh mesh in this.Mesh.Meshes)
        {
            foreach (ModelMeshPart part in mesh.MeshParts)
            {
                part.Effect = shader0;
            }

        }
    }




    bool underWater;
    Vector3 lightDirection = new Vector3(-1.0f, -1.0f, -1.0f);
    public void Draw(SpriteBatch spriteBatch, Player player)
    {

        Matrix world = Matrix.CreateScale(100f) * Matrix.CreateRotationX(MathHelper.ToRadians(-90f)) * Matrix.CreateTranslation(Position);

        //this.shader0.EnableDefaultLighting();
        this.shader0.Parameters["World"].SetValue(world);
        this.shader0.Parameters["View"].SetValue(player.Camera.View);
        this.shader0.Parameters["Projection"].SetValue(player.Camera.Projection);


       // Dessin du model
        foreach (ModelMesh mesh in this.Mesh.Meshes)
        {
            foreach (Effect effect in mesh.Effects)
            {


                effect.CurrentTechnique = effect.Techniques["Textured"];
                effect.Parameters["DiffuseColor"].SetValue(new Vector4(1f, 0.2f, 0.2f, 1f) ); // a reddish light
                effect.Parameters["DiffuseLightDirection"].SetValue(new Vector3(1, 0, 0) );  // coming along the x-axis
                effect.Parameters["SpecularColor"].SetValue(new Vector4(0, 1, 0 ,1f) ); // with green highlights




                effect.Parameters["World"].SetValue(world);
                effect.Parameters["View"].SetValue(player.Camera.View);
                effect.Parameters["Projection"].SetValue(player.Camera.Projection);

            }
            mesh.Draw();
        }
        this.Graphics.BlendState = BlendState.Opaque;



        //Effet 
        if (camera.Position.Y < Position.Y)
            spriteBatch.Draw(this.waterTexture, this.screen, Color.White);

    }

    public void Update(GameTime gameTime)
    {

    }


    void onWater()
    {
        underWater = true;
    }

}

}

A: If you are using the BasicEffect to render the ocean, then BasicEffect has an Alpha property, which affects the transparency. Please see here: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.basiceffect.alpha.aspx
You can use BasicEffect to create transparency with any way that you are using for rendering your model.
