rifter1818
Junior Contributor
This is my Effect file.
float4x4 WorldViewProj;
float Time;
void Main(
in float4 Pos1 : POSITION0,
in float4 Pos2 : POSITION1,
out float4 Pos : POSITION)
{
float4 tPos = pos2 - pos1;
tPos *= Time;
Pos = tPos + pos1;
pos = mul(pos,WorldViewProj);
}
technique ANM
{
pass p0
{
VertexShader = compile vs_1_1 Main;
PixelShader = Null;
}
}
When i try and load it i get the following error
C:\ANM.fx(8): error X3004: undeclared identifier 'pos2'
Any ideas folks.
On another note my vertex Declaration is
Dim ve As VertexElement() = New VertexElement() {New VertexElement(0, 0, _
DeclarationType.Float4, DeclarationMethod.Default, _
DeclarationUsage.Position, 0), New VertexElement(1, 0, _
DeclarationType.Float4, DeclarationMethod.Default, _
DeclarationUsage.Position, 1), VertexElement.VertexDeclarationEnd}
Dec = New VertexDeclaration(dev, ve)
if you see anything wrong there let me know.
float4x4 WorldViewProj;
float Time;
void Main(
in float4 Pos1 : POSITION0,
in float4 Pos2 : POSITION1,
out float4 Pos : POSITION)
{
float4 tPos = pos2 - pos1;
tPos *= Time;
Pos = tPos + pos1;
pos = mul(pos,WorldViewProj);
}
technique ANM
{
pass p0
{
VertexShader = compile vs_1_1 Main;
PixelShader = Null;
}
}
When i try and load it i get the following error
C:\ANM.fx(8): error X3004: undeclared identifier 'pos2'
Any ideas folks.
On another note my vertex Declaration is
Dim ve As VertexElement() = New VertexElement() {New VertexElement(0, 0, _
DeclarationType.Float4, DeclarationMethod.Default, _
DeclarationUsage.Position, 0), New VertexElement(1, 0, _
DeclarationType.Float4, DeclarationMethod.Default, _
DeclarationUsage.Position, 1), VertexElement.VertexDeclarationEnd}
Dec = New VertexDeclaration(dev, ve)
if you see anything wrong there let me know.