Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

How to start with Stage3D?

660 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

How to start with Stage3D?

  1. 1. How To Start?• Books• Online resources• Trial and error method
  2. 2. BooksAdobe Flash 11 Stage3D (Molehill)Game Programming Beginner’s Guide
  3. 3. BooksOpenGL Insights
  4. 4. BooksPractical Rendering and Computationwith Direct3D 11
  5. 5. Books• Real-Time Shadows• Mathematics for 3D Game Programming• Real-Time Rendering, Third Edition• All Wolfgang Engel’s books!!!
  6. 6. • Register in SIGGRAPHSpecial Interest Group on Computer Graphics
  7. 7. Trial and Error Method1. Get an engine2. Compile a simple demo3. Go inside!
  8. 8. AGAL LessonSyntax: [opcode] [destination] [source1] [source2 or sampler]Sample1: mul vt1, vt1, vc0.zSample2: add vt1, vt1, vc0.zva - Vertex Attributes, Context3D::setVertexBufferAtvc - Vertex Constants, Context3D::setProgramConstants- and also you can get it by index vc[0]fs - Fragment Sampler, Context3D::setTextureAtvt - Vertex Tempop - Output Positionoc - Output Colorv - Varying Variables from vertex to fragment shader
  9. 9. AGAL Swizzle LessonRight answer is:vt2.x = vt0.y*vt1.y;vt2.y = vt0.x*vt1.z;vt2.z = vt0.y*vt1.x;vt2.w = vt0.y*vt1.x;mul vt2.yxzw, vt0.xy, vt1.zyxWrong answer is:vt2.x = vt0.y*vt1.y;vt2.y = vt0.x*vt1.z;vt2.z = vt0.y*vt1.x;vt2.w = vt0.y*vt1.x;For vt2 write mask is 1111 (yxzw or xyzw or wxyz or etc. all the same)vt0 swizzle to xyyyvt1 swizzle to zyxx
  10. 10. Thank you!• Stage3D Facebook Group• Skype chatSergey Goncharhttp://gonchar.me/blog@UnknownFlasher

×