• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

problem with agal and Vertex

New Here ,
Oct 22, 2011 Oct 22, 2011

Copy link to clipboard

Copied

i tried with pixel bender 3d  and hardcoding with the same result. My code for the vertex:

 

var

agalVertexSource:String="m44 vt0, va0, vc0\n"

                        "sub vt1, vt0, vc4\n" +

                         "mov op, vt1 \n"       +

                         "mov v0, va1\n";

_context3D.setProgramConstantsFromMatrix(

Context3DProgramType.VERTEX, 0, camTransform,

true);

_context3D.setProgramConstantsFromVector(

Context3DProgramType.VERTEX, 4, Vector.<Number>([0.5,0.0,0,0]));

All i want is a translation of the vertex (sub...) after the multiplication by a matrix (m44...). The result : the program translate the point and then multiply the result by the matrix.

Views

897

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 22, 2011 Oct 22, 2011

Copy link to clipboard

Copied

just to precise something else. If i use a second matrix just to tranlsate the vertex it works:

m44 vt0, va0, vc0

m44 op, vt0, vc4

that's why i think there is something i don't know about the opcode sub.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 01, 2011 Nov 01, 2011

Copy link to clipboard

Copied

Hi Penael,

Giving your vertex program a shot in my test program and I get the correct order of operations (matrix multiply first, then translation).  Do you happen to have a test that can show the issue for me?  You can post it here or email if to me directly at aaronc@adobe.com.

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 06, 2011 Nov 06, 2011

Copy link to clipboard

Copied

LATEST

hello,

thank you but i use only opcodes and AGALMiniAssembler now. i deleted other files.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines