Skip navigation
Currently Being Moderated

float4x4 problem at program.upload()

Dec 28, 2011 7:56 AM



Im trying to get my paticle-vertex-shader to work, but for each particle I need to have a different rotation, scaling and position, but this is not the problem right now. The problem is, that I have to use a float4x4 as an variable. Every time I do lets say float4x4 mat = float4x4(1); the PB3D-Compiler is fine about it.


When compiling the AGAL-program...


this.m_program.upload(programPair.vertexProgram.byteCode, programPair.fragmentProgram.byteCode);


it gives me this as an the error:


AGAL-Überprüfung fehlgeschlagen: Temporärer Registerindex außerhalb des gültigen Bereichs für destination operand bei Token 5 des vertex-Programms.


In english it sais something like this: 


Agal-Check failed: Temporary registerindex out of range for destination operand at token 5 of the vertex-Program.



the full vertex-shader:


  input vertex float4 vo <id: "PB3D_POSITION";>; // vertex offset


  output float4 vertexClipPosition;


          parameter float4x4 object;

          parameter float4x4 camera;


   void evaluateVertex()


                    float4x4 m2                 = float4x4(1.0);

                    float4x4 m                   = object * camera * m2;

                    vertexClipPosition           = m * vo;



Note: This is not the real shader I will use, this is just a test.


m2 is the problem here, because it is not initialized from an existing one. If I just use the matrices from the parameters, everything works like it should.


Any ideas what could be wrong here?




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