/src/aerys/minko/render/shader/part/animation/MorphingShaderPart.as

https://bitbucket.org/HopeSky/mars_nd2d · ActionScript · 34 lines · 26 code · 4 blank · 4 comment · 0 complexity · f299cb94983a4f22cc5df381bb1573e9 MD5 · raw file

  1. package aerys.minko.render.shader.part.animation
  2. {
  3. import aerys.minko.render.shader.SFloat;
  4. import aerys.minko.render.shader.Shader;
  5. import aerys.minko.render.shader.part.ShaderPart;
  6. import aerys.minko.render.geometry.stream.format.VertexComponent;
  7. /**
  8. * The shader part to handle morphing vertex animations.
  9. * @author Romain Gilliotte
  10. */
  11. public class MorphingShaderPart extends ShaderPart
  12. {
  13. public function MorphingShaderPart(main:Shader)
  14. {
  15. super(main);
  16. }
  17. public function getMorphedPosition() : SFloat
  18. {
  19. return getVertexAttribute(VertexComponent.XYZ);
  20. }
  21. public function getMorphedNormal() : SFloat
  22. {
  23. return getVertexAttribute(VertexComponent.NORMAL);
  24. }
  25. public function getMorphedTangent() : SFloat
  26. {
  27. return getVertexAttribute(VertexComponent.TANGENT);
  28. }
  29. }
  30. }