1
0
forked from Rowland/EG
EG/Cesium-1.132/packages/engine/Source/Shaders/Builtin/Functions/backFacing.glsl
2025-08-25 17:48:13 +08:00

14 lines
413 B
GLSL

/**
* Determines if the fragment is back facing
*
* @name czm_backFacing
* @glslFunction
*
* @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
*/
bool czm_backFacing()
{
// !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.
return gl_FrontFacing == false;
}