backFacing.glsl 413 B

12345678910111213
  1. /**
  2. * Determines if the fragment is back facing
  3. *
  4. * @name czm_backFacing
  5. * @glslFunction
  6. *
  7. * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
  8. */
  9. bool czm_backFacing()
  10. {
  11. // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.
  12. return gl_FrontFacing == false;
  13. }