WonHada.com으로 이전

AGAL 언어에 관심이 있다면 필히 가입하세요~ 본문

Adobe AIR

AGAL 언어에 관심이 있다면 필히 가입하세요~

반주부 2012. 6. 15. 15:00
반응형

아래 변수가 이해 되시는 분들이 함께 합니다. :-)
Adobe AIR로 앱 만들기 페이스북 그룹: https://www.facebook.com/groups/315551565170142/

 

AGAL 언어에 관심이 있다면 필히 가입하세요~


static protected var group1VS:String =
"mov vt0, va0\n" + "mov vt0, va1\n" + "mov vt0, va2\n" + "mov vt0, va3\n" +

/////////////////////////////////////////////////////////////////////
// animate
"mov vt0, va0\n" + // vertex stream x,y,z
/////////////////////////////////////////////////////////////////////

// worldTransform
"m44 vt0, vt0, vc1 \n" +

// add offset to this vertex (corner)
"mov vt1, vc0.xxxx\n" +
"sub vt1.x, va1.x, vc0.z\n" +
"sub vt1.y, vc0.z, va1.y\n" +
"mul vt1.xy, vt1.xy, va2.xy\n" + // vt1.xy \in [-.5,.5] <-- va1.xy = [0,1]

"mul vt2.xyz, vc5.xyz, vt1.x\n" + // row0 of camera modeltransform
"mul vt3.xyz, vc6.xyz, vt1.y\n" + // row1 of camera modeltransform
"add vt0.xyz, vt0.xyz, vt2.xyz \n" +
"add vt0.xyz, vt0.xyz, vt3.xyz \n" +

// cameraTransform
"m44 vt0, vt0, vc9 \n" +
"mov op, vt0 \n" +

// compute texcoord by mapping va1 to the view port
"mul vt0.xy, va1.xy, vc13.xy\n" + // texcoord. * wh
"mul vt1.xy, va3.xy, vc13.xy\n" + // ij*wh
"add vt0.xy, vt0.xy, vt1.xy\n" + //
"mov v0, vt0\n" +

// color is in vc16.xyz.
// gray is in vc17.xyz. Make particle gray as the particle time goes.
"mov vt0.w, va4.x\n" +
"mov vt0.xyz, vc16.xyz\n" +
"mul vt0.xyz, vt0.xyz, vt0.www\n" + // color * alpha
"sub vt1.w, vc0.y, va4.x\n" + // 1-alpha
"mul vt1.xyz, vc17.xyz, vt1.www\n" + // gray * (1-alpha)
"add vt0.xyz, vt0.xyz, vt1.xyz\n" +

"mov v1, vt0\n" +
"";


반응형