rifter1818 Posted April 2, 2004 Posted April 2, 2004 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. Quote
RobyDx Posted April 3, 2004 Posted April 3, 2004 HLSL is case sensitive then pos2 is differente from Pos2 hovever to interpolate value use Lerp that do a linear interpolation from 2 vector passing a single value from 0 to 1. Quote Come to visit
createdbyx Posted April 4, 2004 Posted April 4, 2004 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??? Quote Created by: X createdbyx@gmail.com www.createdbyx.com
rifter1818 Posted April 4, 2004 Author Posted April 4, 2004 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. Quote
RobyDx Posted April 4, 2004 Posted April 4, 2004 If you can't see nothing the problen could be that you havent passed transform matrix in properly way Quote Come to visit
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.