Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualbelfegor

Posted 24 January 2013 - 05:08 PM

That's that. Thanks.

EDIT:
Now i have other issue. I want to use vertex shader so i removed 'T' from (POSITION) vertex declaration .
And now have this vertex shader
#pragma pack_matrix(row_major)

float4x4 mat2D : register(c0);

struct A2V
{
	float4 Position  : POSITION;
	float2 TexCoord0 : TEXCOORD0;
	float4 Color     : TEXCOORD1;
};

struct V2P
{
	float4 Position  : POSITION;
	float4 TexCoord0 : TEXCOORD0;
	float4 Color     : TEXCOORD1;
};

void VertexProgram(in A2V IN, out V2P OUT)
{
	OUT.Position    = mul(float4(IN.Position.xyz, 1.0f), mat2D);
	OUT.TexCoord0.x = IN.TexCoord0.x;
	OUT.TexCoord0.y = IN.TexCoord0.y;
	OUT.TexCoord0.z = IN.TexCoord0.x * 0.25f;
	OUT.TexCoord0.w = IN.TexCoord0.y * 0.25f;
	OUT.Color       = IN.Color;
}

and code
D3DXMATRIX mat2D;
D3DXMatrixTransformation2D(&mat2D, NULL, 0.0f, NULL, NULL, 0.0f, NULL);
...
d3d9device->SetVertexShaderConstantF(0, mat2D, 4);

and my quads are in "screen coordinate".

But now i cannot display anything to screen. Any help?

#1belfegor

Posted 24 January 2013 - 04:22 PM

That's that. Thanks.


PARTNERS