Skip navigation
xophiix
Currently Being Moderated

Compile Error in com.adobe.pixelBender3D.translator.transformations::RegisterAssigner/ renameAndAdjus

Jul 6, 2011 7:09 PM

I removed all custom function in my shader and removed the confusing "Incorrect function" error.

But still got this error in AS code, really frustrating!!! the vertex shader code looks fine! fragment shader just do a simple texture sampling to make sure it's ok. I can't see anything wrong in my code. Please help!  I'm sure of that pb3dutil compile ok and I clean and rebuild my project to make sure the embeds.

 

Error in as code:

 

 

// occured at this line: PBASMCompiler.compile

var programs : com.adobe.pixelBender3D.AGALProgramPair = com.adobe.pixelBender3D.PBASMCompiler.compile( inputVertexProgram, inputMaterialVertexProgram, inputFragmentProgram );

 

TypeError: Error #1009: Cannot access a property or method of a null object reference.

     at com.adobe.pixelBender3D.translator.transformations::RegisterAssigner/ renameAndAdjustSourceRegister()[D:\src\aif\sdk\main\pixel_bender_3d\pb 3dlib\src\com\adobe\pixelBender3D\translator\transformations\RegisterA ssigner.as:418]

     at Function/<anonymous>()[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\sr c\com\adobe\pixelBender3D\translator\transformations\RegisterAssigner. as:352]

     at Vector.<*>$/_forEach()

     at Vector$object/http://adobe.com/AS3/2006/builtin::forEach()

     at Function/<anonymous>()[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\sr c\com\adobe\pixelBender3D\translator\transformations\RegisterAssigner. as:380]

     at Vector.<*>$/_forEach()

     at Vector$object/http://adobe.com/AS3/2006/builtin::forEach()

     at com.adobe.pixelBender3D.translator.transformations::RegisterAssigner/ renameAndAdjust()[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\src\com\ adobe\pixelBender3D\translator\transformations\RegisterAssigner.as:387 ]

     at com.adobe.pixelBender3D.translator.transformations::RegisterAssigner/ assignRegisters()[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\src\com\ adobe\pixelBender3D\translator\transformations\RegisterAssigner.as:120 ]

     at com.adobe.pixelBender3D.translator.transformations::RegisterAssigner( )[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\src\com\adobe\pixelBende r3D\translator\transformations\RegisterAssigner.as:66]

     at Translator/http://ns.adobe.com/pb3d/internal/2010::translate()[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\src\com\adobe\pixelBend er3D\translator\Translator.as:1882]

     at com.adobe.pixelBender3D.translator::VertexTranslator/http://ns.adobe.com/pb3d/internal/2010::translate()[D:\src\aif\sdk\main\pixel_bender_3d\pb3dlib\src\com\adobe\pixelBend er3D\translator\VertexTranslator.as:143]

     at com.adobe.pixelBender3D::Translator$/translate()[D:\src\aif\sdk\main\ pixel_bender_3d\pb3dlib\src\com\adobe\pixelBender3D\Translator.as:69]

     at com.adobe.pixelBender3D::PBASMCompiler$/compile()[D:\src\aif\sdk\main \pixel_bender_3d\pb3dlib\src\com\adobe\pixelBender3D\PBASMCompiler.as: 57]

     at deltax.graphic.render::SkinnedMeshPass/updateProgram()[E:\Flash\proje ct_w11a\branch\develop_version\as\deltax\src\deltax\graphic\render\Ski nnedMeshPass.as:113]

...

 

 

 

and the vertex code:

 

 

<languageVersion : 1.0;>

vertex kernel SkinnedMesh

<

    namespace : "AIF Test";

    vendor : "Adobe";

    version : 1;

>

{

     parameter float4x4 worldViewProjectionMatrix;

 

     const int MAX_BONE_TRANSFORM = 39 * 3;

 

     // no 4x3 matrix so...

     parameter float4 boneTransforms[ MAX_BONE_TRANSFORM ];

 

    input vertex float3 vertexPosition

    <

        id : "PB3D_POSITION";

    >;

 

     input vertex float3 vertexNormal

    <

        id : "PB3D_NORMAL";

    >;

 

    input vertex float4 boneIndice

    <

        id : "PB3D_BONE_INDEX";

    >;

 

    input vertex float4 boneWeights

    <

        id : "PB3D_WEIGHT";

    >;

 

    output float4 vertexClipPosition;

 

    void evaluateVertex()

    {       

          float4 inPos4 = float4( vertexPosition.x, vertexPosition.y, vertexPosition.z, 1.0 );

         

          int4 indice = int4( boneIndice );

          float4 result = float4(0.0);

          result.x = dot( inPos4, boneTransforms[indice.x] );

          result.y = dot( inPos4, boneTransforms[indice.x + 1] );

          result.z = dot( inPos4, boneTransforms[indice.x + 2] );

          result = result * boneWeights.x;

    

          result.x += dot( inPos4, boneTransforms[indice.y] ) * boneWeights.y;

          result.y += dot( inPos4, boneTransforms[indice.y + 1] ) * boneWeights.y;

          result.z += dot( inPos4, boneTransforms[indice.y + 2] ) * boneWeights.y;

    

          result.x += dot( inPos4, boneTransforms[indice.z] ) * boneWeights.z;

          result.y += dot( inPos4, boneTransforms[indice.z + 1] ) * boneWeights.z;

          result.z += dot( inPos4, boneTransforms[indice.z + 2] ) * boneWeights.z;

         

          result.x += dot( inPos4, boneTransforms[indice.w] ) * boneWeights.w;

          result.y += dot( inPos4, boneTransforms[indice.w + 1] ) * boneWeights.w;

          result.z += dot( inPos4, boneTransforms[indice.w + 2] ) * boneWeights.w;

          result.w = 1.0;

 

        vertexClipPosition = result * worldViewProjectionMatrix;

    }

}

 

 

 
Replies
  • Currently Being Moderated
    Jul 11, 2011 5:55 PM   in reply to xophiix

    I don't see anything obviously wrong - we'll look into it. It is possible that the kernel is simply too big (in which case we should be giving you a much more meaningful error). Our instruction limit is very low.

     

    Bob

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 26, 2011 11:54 AM   in reply to AIF Bob

    This problem has been fixed in preview 3 of Pixel Bender 3D

     

    Bob

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points