computePosition.glsl 731 B

12345678910111213141516171819202122
  1. /**
  2. * Returns a position in model coordinates relative to eye taking into
  3. * account the current scene mode: 3D, 2D, or Columbus view.
  4. * <p>
  5. * This uses standard position attributes, <code>position3DHigh</code>,
  6. * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>,
  7. * and should be used when writing a vertex shader for an {@link Appearance}.
  8. * </p>
  9. *
  10. * @name czm_computePosition
  11. * @glslFunction
  12. *
  13. * @returns {vec4} The position relative to eye.
  14. *
  15. * @example
  16. * vec4 p = czm_computePosition();
  17. * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
  18. * gl_Position = czm_modelViewProjectionRelativeToEye * p;
  19. *
  20. * @see czm_translateRelativeToEye
  21. */
  22. vec4 czm_computePosition();