Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted
I think HLSL is case sensitive so the line "float4 tPos = pos2 - pos1;" needs to be "float4 tPos = Pos2 - Pos1;" cause you declared your Pos1 and Pos2 vars with capital P's. ... Yes, no, maybe so???

Created by: X

createdbyx@gmail.com

www.createdbyx.com

Posted
Very Much So. Got The Case sensitive thing worked out not sure what the problem is now, no errors but nothing is displayed. But thats not a problem for here right now. Oh And Thumbs up for RobyDx's ShaderDK very nice. Check out his site.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...