Michael Hansen


this work fine on windows bu does not work on xbox360

code:

public class QuadMesh

{

public VertexBuffer MyVertexScreenQuad;

public VertexDeclaration MyVertexDeclaration;

public void CreateScreenQuad(CreateSettings Evo)

{

EvoPositionTexture[] Quad = new EvoPositionTexture[4];

Quad[0].Position = new Vector4(0, 0, 1f, 1f);

Quad[0].Texture1 = new Vector2(1, 1);

Quad[1].Position = new Vector4(Evo.ScreenWidth, 0, 1f, 1f);

Quad[1].Texture1 = new Vector2(0, 1);

Quad[2].Position = new Vector4(0, Evo.ScreenHeight, 1f, 1f);

Quad[2].Texture1 = new Vector2(0, 0);

Quad[3].Position = new Vector4(Evo.ScreenWidth, Evo.ScreenHeight, 1f, 1f);

Quad[3].Texture1 = new Vector2(1, 0);

MyVertexScreenQuad = new VertexBuffer(Evo.GraphicsDevice, typeof(EvoPositionTexture), 4, ResourceUsage.WriteOnly);

MyVertexScreenQuad.SetData<EvoPositionTexture>(Quad);

MyVertexDeclaration = new VertexDeclaration(Evo.GraphicsDevice, EvoPositionTexture.VertexElements);

}

public void RenderScreenQuad(CreateSettings Evo)

{

Evo.GraphicsDevice.VertexDeclaration = MyVertexDeclaration;

Evo.GraphicsDevice.Vertices[0].SetSource(MyVertexScreenQuad, 0, EvoPositionTexture.SizeInBytes);

Evo.GraphicsDevice.DrawPrimitives(PrimitiveType.TriangleList, 0, 12);

}

public QuadMesh()

{

}

}

vertex format code:

public struct EvoPositionTexture

{

public Vector4 Position;

public Vector2 Texture1;

public EvoPositionTexture(Vector4 position, Vector2 tex0)

{

this.Position = position;

this.Texture1 = tex0;

}

public static readonly VertexElement[] VertexElements = new VertexElement[]

{

new VertexElement(0, 0, VertexElementFormat.Vector4,VertexElementMethod.Default,VertexElementUsage.Position, 0),

new VertexElement(0, 12,VertexElementFormat.Vector2,VertexElementMethod.Default,VertexElementUsage.TextureCoordinate, 0),

};

public static bool operator !=(EvoPositionTexture left, EvoPositionTexture right)

{

return left.GetHashCode() != right.GetHashCode();

}

public static bool operator ==(EvoPositionTexture left, EvoPositionTexture right)

{

return left.GetHashCode() == right.GetHashCode();

}

public override bool Equals(object obj)

{

return this == (EvoPositionTexture)obj;

}

public static int SizeInBytes

{

get { return sizeof(float) * 6; }

}

public override int GetHashCode()

{

return Position.GetHashCode() | Texture1.GetHashCode();

}

public override string ToString()

{

return string.Format("{0},{1},{2},{3},{4},{5}", Position.X, Position.Y, Position.Z, Position.W, Texture1.X, Texture1.Y);

}

}




Re: Screen align quad on xbox360

Jim Perry


What exactly do you mean by "does not work"




Re: Screen align quad on xbox360

Michael Hansen

when i render a quad to the screen from a rendertarget it works on winxp

when i render a quad to the screen from a rendertarget it does not work on xbox

i have total of 24 rendertarget and i have sharn post on rendertarget

it shood work

when i reduce the amount of rendertarget to 8 it will work







Re: Screen align quad on xbox360

Shawn Hargreaves - MSFT

As Jim said, you're going to have to give more detail about exactly what you mean by "does not work".

Do you get an exception A hang A blank screen Incorrect output results





Re: Screen align quad on xbox360

Michael Hansen

i have my engine and it feutures a sun render with a high hdr pass,bloompass and a streek sampler that uses 12 rendertarget (the best sun render ever created) and a compossinting shader and a skydome shader that calculate the

rayleighCoeff , mieCoeff , mie

it is part of my game engine i have to for dream build play

i wood like to send the source code on a mail if you can take look what i am doing worng..

it is a small sample of the sun render part

my mail is mh@3devolution.net

i relly like if you cood help Shawn Hargreaves - MSFT

i think you wrote a paper on some years ago it just a small sample of my render it runs on windows xp but when i transfere it the the xbox i get a blank screen

i will not send the hole engine you have to wait to dream build play just the sun and a win and xbox sample

please help

michael

let me now on my mail if you will help and i send you the code about 2mb or so