Add existing to tracked

This commit is contained in:
Jay
2026-08-11 09:53:42 -04:00
parent afe07f3055
commit ffd6e3d73c
8531 changed files with 4396230 additions and 0 deletions
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for converting radians to degrees.
*
* @alias czm_degreesPerRadian
* @glslConstant
*
* @see CesiumMath.DEGREES_PER_RADIAN
*
* @example
* // GLSL declaration
* const float czm_degreesPerRadian = ...;
*
* // Example
* float deg = czm_degreesPerRadian * rad;
*/
const float czm_degreesPerRadian = 57.29577951308232;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for converting radians to degrees.\n\
*\n\
* @alias czm_degreesPerRadian\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.DEGREES_PER_RADIAN\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_degreesPerRadian = ...;\n\
*\n\
* // Example\n\
* float deg = czm_degreesPerRadian * rad;\n\
*/\n\
const float czm_degreesPerRadian = 57.29577951308232;\n\
";
@@ -0,0 +1,14 @@
/**
* A built-in GLSL vec2 constant for defining the depth range.
* This is a workaround to a bug where IE11 does not implement gl_DepthRange.
*
* @alias czm_depthRange
* @glslConstant
*
* @example
* // GLSL declaration
* float depthRangeNear = czm_depthRange.near;
* float depthRangeFar = czm_depthRange.far;
*
*/
const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
@@ -0,0 +1,16 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL vec2 constant for defining the depth range.\n\
* This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n\
*\n\
* @alias czm_depthRange\n\
* @glslConstant\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* float depthRangeNear = czm_depthRange.near;\n\
* float depthRangeFar = czm_depthRange.far;\n\
*\n\
*/\n\
const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n\
";
@@ -0,0 +1,7 @@
/**
* 0.1
*
* @name czm_epsilon1
* @glslConstant
*/
const float czm_epsilon1 = 0.1;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.1\n\
*\n\
* @name czm_epsilon1\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon1 = 0.1;\n\
";
@@ -0,0 +1,7 @@
/**
* 0.01
*
* @name czm_epsilon2
* @glslConstant
*/
const float czm_epsilon2 = 0.01;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.01\n\
*\n\
* @name czm_epsilon2\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon2 = 0.01;\n\
";
@@ -0,0 +1,7 @@
/**
* 0.001
*
* @name czm_epsilon3
* @glslConstant
*/
const float czm_epsilon3 = 0.001;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.001\n\
*\n\
* @name czm_epsilon3\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon3 = 0.001;\n\
";
@@ -0,0 +1,7 @@
/**
* 0.0001
*
* @name czm_epsilon4
* @glslConstant
*/
const float czm_epsilon4 = 0.0001;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.0001\n\
*\n\
* @name czm_epsilon4\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon4 = 0.0001;\n\
";
@@ -0,0 +1,7 @@
/**
* 0.00001
*
* @name czm_epsilon5
* @glslConstant
*/
const float czm_epsilon5 = 0.00001;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.00001\n\
*\n\
* @name czm_epsilon5\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon5 = 0.00001;\n\
";
@@ -0,0 +1,7 @@
/**
* 0.000001
*
* @name czm_epsilon6
* @glslConstant
*/
const float czm_epsilon6 = 0.000001;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.000001\n\
*\n\
* @name czm_epsilon6\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon6 = 0.000001;\n\
";
@@ -0,0 +1,7 @@
/**
* 0.0000001
*
* @name czm_epsilon7
* @glslConstant
*/
const float czm_epsilon7 = 0.0000001;
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* 0.0000001\n\
*\n\
* @name czm_epsilon7\n\
* @glslConstant\n\
*/\n\
const float czm_epsilon7 = 0.0000001;\n\
";
@@ -0,0 +1,7 @@
/**
* DOC_TBA
*
* @name czm_infinity
* @glslConstant
*/
const float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?
@@ -0,0 +1,9 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* DOC_TBA\n\
*\n\
* @name czm_infinity\n\
* @glslConstant\n\
*/\n\
const float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>1/pi</code>.
*
* @alias czm_oneOverPi
* @glslConstant
*
* @see CesiumMath.ONE_OVER_PI
*
* @example
* // GLSL declaration
* const float czm_oneOverPi = ...;
*
* // Example
* float pi = 1.0 / czm_oneOverPi;
*/
const float czm_oneOverPi = 0.3183098861837907;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>1/pi</code>.\n\
*\n\
* @alias czm_oneOverPi\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.ONE_OVER_PI\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_oneOverPi = ...;\n\
*\n\
* // Example\n\
* float pi = 1.0 / czm_oneOverPi;\n\
*/\n\
const float czm_oneOverPi = 0.3183098861837907;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>1/2pi</code>.
*
* @alias czm_oneOverTwoPi
* @glslConstant
*
* @see CesiumMath.ONE_OVER_TWO_PI
*
* @example
* // GLSL declaration
* const float czm_oneOverTwoPi = ...;
*
* // Example
* float pi = 2.0 * czm_oneOverTwoPi;
*/
const float czm_oneOverTwoPi = 0.15915494309189535;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>1/2pi</code>.\n\
*\n\
* @alias czm_oneOverTwoPi\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.ONE_OVER_TWO_PI\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_oneOverTwoPi = ...;\n\
*\n\
* // Example\n\
* float pi = 2.0 * czm_oneOverTwoPi;\n\
*/\n\
const float czm_oneOverTwoPi = 0.15915494309189535;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
*
* @name czm_passCesium3DTile
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTile = 6.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n\
*\n\
* @name czm_passCesium3DTile\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCesium3DTile = 6.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
*
* @name czm_passCesium3DTileClassification
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileClassification = 7.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n\
*\n\
* @name czm_passCesium3DTileClassification\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCesium3DTileClassification = 7.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
*
* @name czm_passCesium3DTileClassificationIgnoreShow
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileClassificationIgnoreShow = 8.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n\
*\n\
* @name czm_passCesium3DTileClassificationIgnoreShow\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCesium3DTileClassificationIgnoreShow = 8.0;\n\
";
@@ -0,0 +1,10 @@
/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES}
*
* @name czm_passCesium3DTileEdges
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileEdges = 4.0;
@@ -0,0 +1,12 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES}\n\
*\n\
* @name czm_passCesium3DTileEdges\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCesium3DTileEdges = 4.0;\n\
\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES_DIRECT}
*
* @name czm_passCesium3DTileEdgesDirect
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileEdgesDirect = 12.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES_DIRECT}\n\
*\n\
* @name czm_passCesium3DTileEdgesDirect\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCesium3DTileEdgesDirect = 12.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_PLANAR_FILL_ID}
*
* @name czm_passCesium3DTilePlanarFillId
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTilePlanarFillId = 5.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_PLANAR_FILL_ID}\n\
*\n\
* @name czm_passCesium3DTilePlanarFillId\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCesium3DTilePlanarFillId = 5.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#CLASSIFICATION}
*
* @name czm_passClassification
* @glslConstant
*
* @see czm_pass
*/
const float czm_passClassification = 8.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n\
*\n\
* @name czm_passClassification\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passClassification = 8.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#COMPUTE}
*
* @name czm_passCompute
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCompute = 1.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#COMPUTE}\n\
*\n\
* @name czm_passCompute\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passCompute = 1.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#ENVIRONMENT}
*
* @name czm_passEnvironment
* @glslConstant
*
* @see czm_pass
*/
const float czm_passEnvironment = 0.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n\
*\n\
* @name czm_passEnvironment\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passEnvironment = 0.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
*
* @name czm_passGaussianSplats
* @glslConstant
*
* @see czm_pass
*/
const float czm_passGaussianSplats = 12.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}\n\
*\n\
* @name czm_passGaussianSplats\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passGaussianSplats = 12.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#GLOBE}
*
* @name czm_passGlobe
* @glslConstant
*
* @see czm_pass
*/
const float czm_passGlobe = 2.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#GLOBE}\n\
*\n\
* @name czm_passGlobe\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passGlobe = 2.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#OPAQUE}
*
* @name czm_passOpaque
* @glslConstant
*
* @see czm_pass
*/
const float czm_passOpaque = 9.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#OPAQUE}\n\
*\n\
* @name czm_passOpaque\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passOpaque = 9.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#OVERLAY}
*
* @name czm_passOverlay
* @glslConstant
*
* @see czm_pass
*/
const float czm_passOverlay = 13.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#OVERLAY}\n\
*\n\
* @name czm_passOverlay\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passOverlay = 13.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
*
* @name czm_passTerrainClassification
* @glslConstant
*
* @see czm_pass
*/
const float czm_passTerrainClassification = 3.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n\
*\n\
* @name czm_passTerrainClassification\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passTerrainClassification = 3.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#TRANSLUCENT}
*
* @name czm_passTranslucent
* @glslConstant
*
* @see czm_pass
*/
const float czm_passTranslucent = 10.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n\
*\n\
* @name czm_passTranslucent\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passTranslucent = 10.0;\n\
";
@@ -0,0 +1,9 @@
/**
* The automatic GLSL constant for {@link Pass#VOXELS}
*
* @name czm_passVoxels
* @glslConstant
*
* @see czm_pass
*/
const float czm_passVoxels = 11.0;
@@ -0,0 +1,11 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The automatic GLSL constant for {@link Pass#VOXELS}\n\
*\n\
* @name czm_passVoxels\n\
* @glslConstant\n\
*\n\
* @see czm_pass\n\
*/\n\
const float czm_passVoxels = 11.0;\n\
";
+16
View File
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>Math.PI</code>.
*
* @alias czm_pi
* @glslConstant
*
* @see CesiumMath.PI
*
* @example
* // GLSL declaration
* const float czm_pi = ...;
*
* // Example
* float twoPi = 2.0 * czm_pi;
*/
const float czm_pi = 3.141592653589793;
+18
View File
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>Math.PI</code>.\n\
*\n\
* @alias czm_pi\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.PI\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_pi = ...;\n\
*\n\
* // Example\n\
* float twoPi = 2.0 * czm_pi;\n\
*/\n\
const float czm_pi = 3.141592653589793;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>pi/4</code>.
*
* @alias czm_piOverFour
* @glslConstant
*
* @see CesiumMath.PI_OVER_FOUR
*
* @example
* // GLSL declaration
* const float czm_piOverFour = ...;
*
* // Example
* float pi = 4.0 * czm_piOverFour;
*/
const float czm_piOverFour = 0.7853981633974483;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>pi/4</code>.\n\
*\n\
* @alias czm_piOverFour\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.PI_OVER_FOUR\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_piOverFour = ...;\n\
*\n\
* // Example\n\
* float pi = 4.0 * czm_piOverFour;\n\
*/\n\
const float czm_piOverFour = 0.7853981633974483;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>pi/6</code>.
*
* @alias czm_piOverSix
* @glslConstant
*
* @see CesiumMath.PI_OVER_SIX
*
* @example
* // GLSL declaration
* const float czm_piOverSix = ...;
*
* // Example
* float pi = 6.0 * czm_piOverSix;
*/
const float czm_piOverSix = 0.5235987755982988;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>pi/6</code>.\n\
*\n\
* @alias czm_piOverSix\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.PI_OVER_SIX\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_piOverSix = ...;\n\
*\n\
* // Example\n\
* float pi = 6.0 * czm_piOverSix;\n\
*/\n\
const float czm_piOverSix = 0.5235987755982988;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>pi/3</code>.
*
* @alias czm_piOverThree
* @glslConstant
*
* @see CesiumMath.PI_OVER_THREE
*
* @example
* // GLSL declaration
* const float czm_piOverThree = ...;
*
* // Example
* float pi = 3.0 * czm_piOverThree;
*/
const float czm_piOverThree = 1.0471975511965976;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>pi/3</code>.\n\
*\n\
* @alias czm_piOverThree\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.PI_OVER_THREE\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_piOverThree = ...;\n\
*\n\
* // Example\n\
* float pi = 3.0 * czm_piOverThree;\n\
*/\n\
const float czm_piOverThree = 1.0471975511965976;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>pi/2</code>.
*
* @alias czm_piOverTwo
* @glslConstant
*
* @see CesiumMath.PI_OVER_TWO
*
* @example
* // GLSL declaration
* const float czm_piOverTwo = ...;
*
* // Example
* float pi = 2.0 * czm_piOverTwo;
*/
const float czm_piOverTwo = 1.5707963267948966;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>pi/2</code>.\n\
*\n\
* @alias czm_piOverTwo\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.PI_OVER_TWO\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_piOverTwo = ...;\n\
*\n\
* // Example\n\
* float pi = 2.0 * czm_piOverTwo;\n\
*/\n\
const float czm_piOverTwo = 1.5707963267948966;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for converting degrees to radians.
*
* @alias czm_radiansPerDegree
* @glslConstant
*
* @see CesiumMath.RADIANS_PER_DEGREE
*
* @example
* // GLSL declaration
* const float czm_radiansPerDegree = ...;
*
* // Example
* float rad = czm_radiansPerDegree * deg;
*/
const float czm_radiansPerDegree = 0.017453292519943295;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for converting degrees to radians.\n\
*\n\
* @alias czm_radiansPerDegree\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.RADIANS_PER_DEGREE\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_radiansPerDegree = ...;\n\
*\n\
* // Example\n\
* float rad = czm_radiansPerDegree * deg;\n\
*/\n\
const float czm_radiansPerDegree = 0.017453292519943295;\n\
";
@@ -0,0 +1,11 @@
/**
* The constant identifier for the 2D {@link SceneMode}
*
* @name czm_sceneMode2D
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneModeColumbusView
* @see czm_sceneMode3D
* @see czm_sceneModeMorphing
*/
const float czm_sceneMode2D = 2.0;
@@ -0,0 +1,13 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The constant identifier for the 2D {@link SceneMode}\n\
*\n\
* @name czm_sceneMode2D\n\
* @glslConstant\n\
* @see czm_sceneMode\n\
* @see czm_sceneModeColumbusView\n\
* @see czm_sceneMode3D\n\
* @see czm_sceneModeMorphing\n\
*/\n\
const float czm_sceneMode2D = 2.0;\n\
";
@@ -0,0 +1,11 @@
/**
* The constant identifier for the 3D {@link SceneMode}
*
* @name czm_sceneMode3D
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneMode2D
* @see czm_sceneModeColumbusView
* @see czm_sceneModeMorphing
*/
const float czm_sceneMode3D = 3.0;
@@ -0,0 +1,13 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The constant identifier for the 3D {@link SceneMode}\n\
*\n\
* @name czm_sceneMode3D\n\
* @glslConstant\n\
* @see czm_sceneMode\n\
* @see czm_sceneMode2D\n\
* @see czm_sceneModeColumbusView\n\
* @see czm_sceneModeMorphing\n\
*/\n\
const float czm_sceneMode3D = 3.0;\n\
";
@@ -0,0 +1,11 @@
/**
* The constant identifier for the Columbus View {@link SceneMode}
*
* @name czm_sceneModeColumbusView
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneMode2D
* @see czm_sceneMode3D
* @see czm_sceneModeMorphing
*/
const float czm_sceneModeColumbusView = 1.0;
@@ -0,0 +1,13 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The constant identifier for the Columbus View {@link SceneMode}\n\
*\n\
* @name czm_sceneModeColumbusView\n\
* @glslConstant\n\
* @see czm_sceneMode\n\
* @see czm_sceneMode2D\n\
* @see czm_sceneMode3D\n\
* @see czm_sceneModeMorphing\n\
*/\n\
const float czm_sceneModeColumbusView = 1.0;\n\
";
@@ -0,0 +1,11 @@
/**
* The constant identifier for the Morphing {@link SceneMode}
*
* @name czm_sceneModeMorphing
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneMode2D
* @see czm_sceneModeColumbusView
* @see czm_sceneMode3D
*/
const float czm_sceneModeMorphing = 0.0;
@@ -0,0 +1,13 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The constant identifier for the Morphing {@link SceneMode}\n\
*\n\
* @name czm_sceneModeMorphing\n\
* @glslConstant\n\
* @see czm_sceneMode\n\
* @see czm_sceneMode2D\n\
* @see czm_sceneModeColumbusView\n\
* @see czm_sceneMode3D\n\
*/\n\
const float czm_sceneModeMorphing = 0.0;\n\
";
@@ -0,0 +1,13 @@
/**
* A built-in GLSL floating-point constant for one solar radius.
*
* @alias czm_solarRadius
* @glslConstant
*
* @see CesiumMath.SOLAR_RADIUS
*
* @example
* // GLSL declaration
* const float czm_solarRadius = ...;
*/
const float czm_solarRadius = 695500000.0;
@@ -0,0 +1,15 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for one solar radius.\n\
*\n\
* @alias czm_solarRadius\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.SOLAR_RADIUS\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_solarRadius = ...;\n\
*/\n\
const float czm_solarRadius = 695500000.0;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>3pi/2</code>.
*
* @alias czm_threePiOver2
* @glslConstant
*
* @see CesiumMath.THREE_PI_OVER_TWO
*
* @example
* // GLSL declaration
* const float czm_threePiOver2 = ...;
*
* // Example
* float pi = (2.0 / 3.0) * czm_threePiOver2;
*/
const float czm_threePiOver2 = 4.71238898038469;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>3pi/2</code>.\n\
*\n\
* @alias czm_threePiOver2\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.THREE_PI_OVER_TWO\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_threePiOver2 = ...;\n\
*\n\
* // Example\n\
* float pi = (2.0 / 3.0) * czm_threePiOver2;\n\
*/\n\
const float czm_threePiOver2 = 4.71238898038469;\n\
";
@@ -0,0 +1,16 @@
/**
* A built-in GLSL floating-point constant for <code>2pi</code>.
*
* @alias czm_twoPi
* @glslConstant
*
* @see CesiumMath.TWO_PI
*
* @example
* // GLSL declaration
* const float czm_twoPi = ...;
*
* // Example
* float pi = czm_twoPi / 2.0;
*/
const float czm_twoPi = 6.283185307179586;
+18
View File
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* A built-in GLSL floating-point constant for <code>2pi</code>.\n\
*\n\
* @alias czm_twoPi\n\
* @glslConstant\n\
*\n\
* @see CesiumMath.TWO_PI\n\
*\n\
* @example\n\
* // GLSL declaration\n\
* const float czm_twoPi = ...;\n\
*\n\
* // Example\n\
* float pi = czm_twoPi / 2.0;\n\
*/\n\
const float czm_twoPi = 6.283185307179586;\n\
";
@@ -0,0 +1,16 @@
/**
* The maximum latitude, in radians, both North and South, supported by a Web Mercator
* (EPSG:3857) projection. Technically, the Mercator projection is defined
* for any latitude up to (but not including) 90 degrees, but it makes sense
* to cut it off sooner because it grows exponentially with increasing latitude.
* The logic behind this particular cutoff value, which is the one used by
* Google Maps, Bing Maps, and Esri, is that it makes the projection
* square. That is, the rectangle is equal in the X and Y directions.
*
* The constant value is computed as follows:
* czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
*
* @name czm_webMercatorMaxLatitude
* @glslConstant
*/
const float czm_webMercatorMaxLatitude = 1.4844222297453324;
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* The maximum latitude, in radians, both North and South, supported by a Web Mercator\n\
* (EPSG:3857) projection. Technically, the Mercator projection is defined\n\
* for any latitude up to (but not including) 90 degrees, but it makes sense\n\
* to cut it off sooner because it grows exponentially with increasing latitude.\n\
* The logic behind this particular cutoff value, which is the one used by\n\
* Google Maps, Bing Maps, and Esri, is that it makes the projection\n\
* square. That is, the rectangle is equal in the X and Y directions.\n\
*\n\
* The constant value is computed as follows:\n\
* czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n\
*\n\
* @name czm_webMercatorMaxLatitude\n\
* @glslConstant\n\
*/\n\
const float czm_webMercatorMaxLatitude = 1.4844222297453324;\n\
";
+290
View File
@@ -0,0 +1,290 @@
//This file is automatically rebuilt by the Cesium build process.
import czm_degreesPerRadian from './Constants/degreesPerRadian.js'
import czm_depthRange from './Constants/depthRange.js'
import czm_epsilon1 from './Constants/epsilon1.js'
import czm_epsilon2 from './Constants/epsilon2.js'
import czm_epsilon3 from './Constants/epsilon3.js'
import czm_epsilon4 from './Constants/epsilon4.js'
import czm_epsilon5 from './Constants/epsilon5.js'
import czm_epsilon6 from './Constants/epsilon6.js'
import czm_epsilon7 from './Constants/epsilon7.js'
import czm_infinity from './Constants/infinity.js'
import czm_oneOverPi from './Constants/oneOverPi.js'
import czm_oneOverTwoPi from './Constants/oneOverTwoPi.js'
import czm_passCesium3DTile from './Constants/passCesium3DTile.js'
import czm_passCesium3DTileClassification from './Constants/passCesium3DTileClassification.js'
import czm_passCesium3DTileClassificationIgnoreShow from './Constants/passCesium3DTileClassificationIgnoreShow.js'
import czm_passCesium3DTileEdges from './Constants/passCesium3DTileEdges.js'
import czm_passCesium3DTileEdgesDirect from './Constants/passCesium3DTileEdgesDirect.js'
import czm_passCesium3DTilePlanarFillId from './Constants/passCesium3DTilePlanarFillId.js'
import czm_passClassification from './Constants/passClassification.js'
import czm_passCompute from './Constants/passCompute.js'
import czm_passEnvironment from './Constants/passEnvironment.js'
import czm_passGaussianSplats from './Constants/passGaussianSplats.js'
import czm_passGlobe from './Constants/passGlobe.js'
import czm_passOpaque from './Constants/passOpaque.js'
import czm_passOverlay from './Constants/passOverlay.js'
import czm_passTerrainClassification from './Constants/passTerrainClassification.js'
import czm_passTranslucent from './Constants/passTranslucent.js'
import czm_passVoxels from './Constants/passVoxels.js'
import czm_pi from './Constants/pi.js'
import czm_piOverFour from './Constants/piOverFour.js'
import czm_piOverSix from './Constants/piOverSix.js'
import czm_piOverThree from './Constants/piOverThree.js'
import czm_piOverTwo from './Constants/piOverTwo.js'
import czm_radiansPerDegree from './Constants/radiansPerDegree.js'
import czm_sceneMode2D from './Constants/sceneMode2D.js'
import czm_sceneMode3D from './Constants/sceneMode3D.js'
import czm_sceneModeColumbusView from './Constants/sceneModeColumbusView.js'
import czm_sceneModeMorphing from './Constants/sceneModeMorphing.js'
import czm_solarRadius from './Constants/solarRadius.js'
import czm_threePiOver2 from './Constants/threePiOver2.js'
import czm_twoPi from './Constants/twoPi.js'
import czm_webMercatorMaxLatitude from './Constants/webMercatorMaxLatitude.js'
import czm_depthRangeStruct from './Structs/depthRangeStruct.js'
import czm_material from './Structs/material.js'
import czm_materialInput from './Structs/materialInput.js'
import czm_modelMaterial from './Structs/modelMaterial.js'
import czm_modelVertexOutput from './Structs/modelVertexOutput.js'
import czm_ray from './Structs/ray.js'
import czm_raySegment from './Structs/raySegment.js'
import czm_shadowParameters from './Structs/shadowParameters.js'
import czm_HSBToRGB from './Functions/HSBToRGB.js'
import czm_HSLToRGB from './Functions/HSLToRGB.js'
import czm_RGBToHSB from './Functions/RGBToHSB.js'
import czm_RGBToHSL from './Functions/RGBToHSL.js'
import czm_RGBToXYZ from './Functions/RGBToXYZ.js'
import czm_XYZToRGB from './Functions/XYZToRGB.js'
import czm_acesTonemapping from './Functions/acesTonemapping.js'
import czm_alphaWeight from './Functions/alphaWeight.js'
import czm_antialias from './Functions/antialias.js'
import czm_applyHSBShift from './Functions/applyHSBShift.js'
import czm_approximateSphericalCoordinates from './Functions/approximateSphericalCoordinates.js'
import czm_approximateTanh from './Functions/approximateTanh.js'
import czm_backFacing from './Functions/backFacing.js'
import czm_branchFreeTernary from './Functions/branchFreeTernary.js'
import czm_cascadeColor from './Functions/cascadeColor.js'
import czm_cascadeDistance from './Functions/cascadeDistance.js'
import czm_cascadeMatrix from './Functions/cascadeMatrix.js'
import czm_cascadeWeights from './Functions/cascadeWeights.js'
import czm_clipPolygons from './Functions/clipPolygons.js'
import czm_columbusViewMorph from './Functions/columbusViewMorph.js'
import czm_computeAtmosphereColor from './Functions/computeAtmosphereColor.js'
import czm_computeGroundAtmosphereScattering from './Functions/computeGroundAtmosphereScattering.js'
import czm_computePosition from './Functions/computePosition.js'
import czm_computeScattering from './Functions/computeScattering.js'
import czm_computeTextureTransform from './Functions/computeTextureTransform.js'
import czm_cosineAndSine from './Functions/cosineAndSine.js'
import czm_decodeRGB8 from './Functions/decodeRGB8.js'
import czm_decompressTextureCoordinates from './Functions/decompressTextureCoordinates.js'
import czm_depthClamp from './Functions/depthClamp.js'
import czm_eastNorthUpToEyeCoordinates from './Functions/eastNorthUpToEyeCoordinates.js'
import czm_ellipsoidContainsPoint from './Functions/ellipsoidContainsPoint.js'
import czm_ellipsoidTextureCoordinates from './Functions/ellipsoidTextureCoordinates.js'
import czm_equalsEpsilon from './Functions/equalsEpsilon.js'
import czm_eyeOffset from './Functions/eyeOffset.js'
import czm_eyeToWindowCoordinates from './Functions/eyeToWindowCoordinates.js'
import czm_fastApproximateAtan from './Functions/fastApproximateAtan.js'
import czm_fog from './Functions/fog.js'
import czm_gammaCorrect from './Functions/gammaCorrect.js'
import czm_geodeticSurfaceNormal from './Functions/geodeticSurfaceNormal.js'
import czm_getDefaultMaterial from './Functions/getDefaultMaterial.js'
import czm_getDynamicAtmosphereLightDirection from './Functions/getDynamicAtmosphereLightDirection.js'
import czm_getLambertDiffuse from './Functions/getLambertDiffuse.js'
import czm_getSpecular from './Functions/getSpecular.js'
import czm_getWaterNoise from './Functions/getWaterNoise.js'
import czm_hue from './Functions/hue.js'
import czm_inverseGamma from './Functions/inverseGamma.js'
import czm_isEmpty from './Functions/isEmpty.js'
import czm_isFull from './Functions/isFull.js'
import czm_latitudeToWebMercatorFraction from './Functions/latitudeToWebMercatorFraction.js'
import czm_lineDistance from './Functions/lineDistance.js'
import czm_linearToSrgb from './Functions/linearToSrgb.js'
import czm_luminance from './Functions/luminance.js'
import czm_maximumComponent from './Functions/maximumComponent.js'
import czm_metersPerPixel from './Functions/metersPerPixel.js'
import czm_modelToWindowCoordinates from './Functions/modelToWindowCoordinates.js'
import czm_multiplyWithColorBalance from './Functions/multiplyWithColorBalance.js'
import czm_nearFarScalar from './Functions/nearFarScalar.js'
import czm_octDecode from './Functions/octDecode.js'
import czm_packDepth from './Functions/packDepth.js'
import czm_pbrLighting from './Functions/pbrLighting.js'
import czm_pbrNeutralTonemapping from './Functions/pbrNeutralTonemapping.js'
import czm_phong from './Functions/phong.js'
import czm_planeDistance from './Functions/planeDistance.js'
import czm_pointAlongRay from './Functions/pointAlongRay.js'
import czm_rayEllipsoidIntersectionInterval from './Functions/rayEllipsoidIntersectionInterval.js'
import czm_raySphereIntersectionInterval from './Functions/raySphereIntersectionInterval.js'
import czm_readDepth from './Functions/readDepth.js'
import czm_readNonPerspective from './Functions/readNonPerspective.js'
import czm_reverseLogDepth from './Functions/reverseLogDepth.js'
import czm_round from './Functions/round.js'
import czm_saturation from './Functions/saturation.js'
import czm_shadowDepthCompare from './Functions/shadowDepthCompare.js'
import czm_shadowVisibility from './Functions/shadowVisibility.js'
import czm_signNotZero from './Functions/signNotZero.js'
import czm_sphericalHarmonics from './Functions/sphericalHarmonics.js'
import czm_srgbToLinear from './Functions/srgbToLinear.js'
import czm_tangentToEyeSpaceMatrix from './Functions/tangentToEyeSpaceMatrix.js'
import czm_textureCube from './Functions/textureCube.js'
import czm_transformPlane from './Functions/transformPlane.js'
import czm_translateRelativeToEye from './Functions/translateRelativeToEye.js'
import czm_translucentPhong from './Functions/translucentPhong.js'
import czm_transpose from './Functions/transpose.js'
import czm_unpackClippingExtents from './Functions/unpackClippingExtents.js'
import czm_unpackDepth from './Functions/unpackDepth.js'
import czm_unpackFloat from './Functions/unpackFloat.js'
import czm_unpackTexture from './Functions/unpackTexture.js'
import czm_unpackUint from './Functions/unpackUint.js'
import czm_valueTransform from './Functions/valueTransform.js'
import czm_vertexLogDepth from './Functions/vertexLogDepth.js'
import czm_windowToEyeCoordinates from './Functions/windowToEyeCoordinates.js'
import czm_writeDepthClamp from './Functions/writeDepthClamp.js'
import czm_writeLogDepth from './Functions/writeLogDepth.js'
import czm_writeNonPerspective from './Functions/writeNonPerspective.js'
export default {
czm_degreesPerRadian : czm_degreesPerRadian,
czm_depthRange : czm_depthRange,
czm_epsilon1 : czm_epsilon1,
czm_epsilon2 : czm_epsilon2,
czm_epsilon3 : czm_epsilon3,
czm_epsilon4 : czm_epsilon4,
czm_epsilon5 : czm_epsilon5,
czm_epsilon6 : czm_epsilon6,
czm_epsilon7 : czm_epsilon7,
czm_infinity : czm_infinity,
czm_oneOverPi : czm_oneOverPi,
czm_oneOverTwoPi : czm_oneOverTwoPi,
czm_passCesium3DTile : czm_passCesium3DTile,
czm_passCesium3DTileClassification : czm_passCesium3DTileClassification,
czm_passCesium3DTileClassificationIgnoreShow : czm_passCesium3DTileClassificationIgnoreShow,
czm_passCesium3DTileEdges : czm_passCesium3DTileEdges,
czm_passCesium3DTileEdgesDirect : czm_passCesium3DTileEdgesDirect,
czm_passCesium3DTilePlanarFillId : czm_passCesium3DTilePlanarFillId,
czm_passClassification : czm_passClassification,
czm_passCompute : czm_passCompute,
czm_passEnvironment : czm_passEnvironment,
czm_passGaussianSplats : czm_passGaussianSplats,
czm_passGlobe : czm_passGlobe,
czm_passOpaque : czm_passOpaque,
czm_passOverlay : czm_passOverlay,
czm_passTerrainClassification : czm_passTerrainClassification,
czm_passTranslucent : czm_passTranslucent,
czm_passVoxels : czm_passVoxels,
czm_pi : czm_pi,
czm_piOverFour : czm_piOverFour,
czm_piOverSix : czm_piOverSix,
czm_piOverThree : czm_piOverThree,
czm_piOverTwo : czm_piOverTwo,
czm_radiansPerDegree : czm_radiansPerDegree,
czm_sceneMode2D : czm_sceneMode2D,
czm_sceneMode3D : czm_sceneMode3D,
czm_sceneModeColumbusView : czm_sceneModeColumbusView,
czm_sceneModeMorphing : czm_sceneModeMorphing,
czm_solarRadius : czm_solarRadius,
czm_threePiOver2 : czm_threePiOver2,
czm_twoPi : czm_twoPi,
czm_webMercatorMaxLatitude : czm_webMercatorMaxLatitude,
czm_depthRangeStruct : czm_depthRangeStruct,
czm_material : czm_material,
czm_materialInput : czm_materialInput,
czm_modelMaterial : czm_modelMaterial,
czm_modelVertexOutput : czm_modelVertexOutput,
czm_ray : czm_ray,
czm_raySegment : czm_raySegment,
czm_shadowParameters : czm_shadowParameters,
czm_HSBToRGB : czm_HSBToRGB,
czm_HSLToRGB : czm_HSLToRGB,
czm_RGBToHSB : czm_RGBToHSB,
czm_RGBToHSL : czm_RGBToHSL,
czm_RGBToXYZ : czm_RGBToXYZ,
czm_XYZToRGB : czm_XYZToRGB,
czm_acesTonemapping : czm_acesTonemapping,
czm_alphaWeight : czm_alphaWeight,
czm_antialias : czm_antialias,
czm_applyHSBShift : czm_applyHSBShift,
czm_approximateSphericalCoordinates : czm_approximateSphericalCoordinates,
czm_approximateTanh : czm_approximateTanh,
czm_backFacing : czm_backFacing,
czm_branchFreeTernary : czm_branchFreeTernary,
czm_cascadeColor : czm_cascadeColor,
czm_cascadeDistance : czm_cascadeDistance,
czm_cascadeMatrix : czm_cascadeMatrix,
czm_cascadeWeights : czm_cascadeWeights,
czm_clipPolygons : czm_clipPolygons,
czm_columbusViewMorph : czm_columbusViewMorph,
czm_computeAtmosphereColor : czm_computeAtmosphereColor,
czm_computeGroundAtmosphereScattering : czm_computeGroundAtmosphereScattering,
czm_computePosition : czm_computePosition,
czm_computeScattering : czm_computeScattering,
czm_computeTextureTransform : czm_computeTextureTransform,
czm_cosineAndSine : czm_cosineAndSine,
czm_decodeRGB8 : czm_decodeRGB8,
czm_decompressTextureCoordinates : czm_decompressTextureCoordinates,
czm_depthClamp : czm_depthClamp,
czm_eastNorthUpToEyeCoordinates : czm_eastNorthUpToEyeCoordinates,
czm_ellipsoidContainsPoint : czm_ellipsoidContainsPoint,
czm_ellipsoidTextureCoordinates : czm_ellipsoidTextureCoordinates,
czm_equalsEpsilon : czm_equalsEpsilon,
czm_eyeOffset : czm_eyeOffset,
czm_eyeToWindowCoordinates : czm_eyeToWindowCoordinates,
czm_fastApproximateAtan : czm_fastApproximateAtan,
czm_fog : czm_fog,
czm_gammaCorrect : czm_gammaCorrect,
czm_geodeticSurfaceNormal : czm_geodeticSurfaceNormal,
czm_getDefaultMaterial : czm_getDefaultMaterial,
czm_getDynamicAtmosphereLightDirection : czm_getDynamicAtmosphereLightDirection,
czm_getLambertDiffuse : czm_getLambertDiffuse,
czm_getSpecular : czm_getSpecular,
czm_getWaterNoise : czm_getWaterNoise,
czm_hue : czm_hue,
czm_inverseGamma : czm_inverseGamma,
czm_isEmpty : czm_isEmpty,
czm_isFull : czm_isFull,
czm_latitudeToWebMercatorFraction : czm_latitudeToWebMercatorFraction,
czm_lineDistance : czm_lineDistance,
czm_linearToSrgb : czm_linearToSrgb,
czm_luminance : czm_luminance,
czm_maximumComponent : czm_maximumComponent,
czm_metersPerPixel : czm_metersPerPixel,
czm_modelToWindowCoordinates : czm_modelToWindowCoordinates,
czm_multiplyWithColorBalance : czm_multiplyWithColorBalance,
czm_nearFarScalar : czm_nearFarScalar,
czm_octDecode : czm_octDecode,
czm_packDepth : czm_packDepth,
czm_pbrLighting : czm_pbrLighting,
czm_pbrNeutralTonemapping : czm_pbrNeutralTonemapping,
czm_phong : czm_phong,
czm_planeDistance : czm_planeDistance,
czm_pointAlongRay : czm_pointAlongRay,
czm_rayEllipsoidIntersectionInterval : czm_rayEllipsoidIntersectionInterval,
czm_raySphereIntersectionInterval : czm_raySphereIntersectionInterval,
czm_readDepth : czm_readDepth,
czm_readNonPerspective : czm_readNonPerspective,
czm_reverseLogDepth : czm_reverseLogDepth,
czm_round : czm_round,
czm_saturation : czm_saturation,
czm_shadowDepthCompare : czm_shadowDepthCompare,
czm_shadowVisibility : czm_shadowVisibility,
czm_signNotZero : czm_signNotZero,
czm_sphericalHarmonics : czm_sphericalHarmonics,
czm_srgbToLinear : czm_srgbToLinear,
czm_tangentToEyeSpaceMatrix : czm_tangentToEyeSpaceMatrix,
czm_textureCube : czm_textureCube,
czm_transformPlane : czm_transformPlane,
czm_translateRelativeToEye : czm_translateRelativeToEye,
czm_translucentPhong : czm_translucentPhong,
czm_transpose : czm_transpose,
czm_unpackClippingExtents : czm_unpackClippingExtents,
czm_unpackDepth : czm_unpackDepth,
czm_unpackFloat : czm_unpackFloat,
czm_unpackTexture : czm_unpackTexture,
czm_unpackUint : czm_unpackUint,
czm_valueTransform : czm_valueTransform,
czm_vertexLogDepth : czm_vertexLogDepth,
czm_windowToEyeCoordinates : czm_windowToEyeCoordinates,
czm_writeDepthClamp : czm_writeDepthClamp,
czm_writeLogDepth : czm_writeLogDepth,
czm_writeNonPerspective : czm_writeNonPerspective
};
@@ -0,0 +1,24 @@
/**
* Converts an HSB color (hue, saturation, brightness) to RGB
* HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
*
* @name czm_HSBToRGB
* @glslFunction
*
* @param {vec3} hsb The color in HSB.
*
* @returns {vec3} The color in RGB.
*
* @example
* vec3 hsb = czm_RGBToHSB(rgb);
* hsb.z *= 0.1;
* rgb = czm_HSBToRGB(hsb);
*/
const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 czm_HSBToRGB(vec3 hsb)
{
vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
}
@@ -0,0 +1,26 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Converts an HSB color (hue, saturation, brightness) to RGB\n\
* HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n\
*\n\
* @name czm_HSBToRGB\n\
* @glslFunction\n\
* \n\
* @param {vec3} hsb The color in HSB.\n\
*\n\
* @returns {vec3} The color in RGB.\n\
*\n\
* @example\n\
* vec3 hsb = czm_RGBToHSB(rgb);\n\
* hsb.z *= 0.1;\n\
* rgb = czm_HSBToRGB(hsb);\n\
*/\n\
\n\
const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\
\n\
vec3 czm_HSBToRGB(vec3 hsb)\n\
{\n\
vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n\
return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n\
}\n\
";
@@ -0,0 +1,31 @@
/**
* Converts an HSL color (hue, saturation, lightness) to RGB
* HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
*
* @name czm_HSLToRGB
* @glslFunction
*
* @param {vec3} rgb The color in HSL.
*
* @returns {vec3} The color in RGB.
*
* @example
* vec3 hsl = czm_RGBToHSL(rgb);
* hsl.z *= 0.1;
* rgb = czm_HSLToRGB(hsl);
*/
vec3 hueToRGB(float hue)
{
float r = abs(hue * 6.0 - 3.0) - 1.0;
float g = 2.0 - abs(hue * 6.0 - 2.0);
float b = 2.0 - abs(hue * 6.0 - 4.0);
return clamp(vec3(r, g, b), 0.0, 1.0);
}
vec3 czm_HSLToRGB(vec3 hsl)
{
vec3 rgb = hueToRGB(hsl.x);
float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
return (rgb - 0.5) * c + hsl.z;
}
@@ -0,0 +1,33 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Converts an HSL color (hue, saturation, lightness) to RGB\n\
* HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n\
*\n\
* @name czm_HSLToRGB\n\
* @glslFunction\n\
* \n\
* @param {vec3} rgb The color in HSL.\n\
*\n\
* @returns {vec3} The color in RGB.\n\
*\n\
* @example\n\
* vec3 hsl = czm_RGBToHSL(rgb);\n\
* hsl.z *= 0.1;\n\
* rgb = czm_HSLToRGB(hsl);\n\
*/\n\
\n\
vec3 hueToRGB(float hue)\n\
{\n\
float r = abs(hue * 6.0 - 3.0) - 1.0;\n\
float g = 2.0 - abs(hue * 6.0 - 2.0);\n\
float b = 2.0 - abs(hue * 6.0 - 4.0);\n\
return clamp(vec3(r, g, b), 0.0, 1.0);\n\
}\n\
\n\
vec3 czm_HSLToRGB(vec3 hsl)\n\
{\n\
vec3 rgb = hueToRGB(hsl.x);\n\
float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n\
return (rgb - 0.5) * c + hsl.z;\n\
}\n\
";
@@ -0,0 +1,27 @@
/**
* Converts an RGB color to HSB (hue, saturation, brightness)
* HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
*
* @name czm_RGBToHSB
* @glslFunction
*
* @param {vec3} rgb The color in RGB.
*
* @returns {vec3} The color in HSB.
*
* @example
* vec3 hsb = czm_RGBToHSB(rgb);
* hsb.z *= 0.1;
* rgb = czm_HSBToRGB(hsb);
*/
const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec3 czm_RGBToHSB(vec3 rgb)
{
vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));
float d = q.x - min(q.w, q.y);
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
}
@@ -0,0 +1,29 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Converts an RGB color to HSB (hue, saturation, brightness)\n\
* HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n\
*\n\
* @name czm_RGBToHSB\n\
* @glslFunction\n\
* \n\
* @param {vec3} rgb The color in RGB.\n\
*\n\
* @returns {vec3} The color in HSB.\n\
*\n\
* @example\n\
* vec3 hsb = czm_RGBToHSB(rgb);\n\
* hsb.z *= 0.1;\n\
* rgb = czm_HSBToRGB(hsb);\n\
*/\n\
\n\
const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\
\n\
vec3 czm_RGBToHSB(vec3 rgb)\n\
{\n\
vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n\
vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\
\n\
float d = q.x - min(q.w, q.y);\n\
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n\
}\n\
";
@@ -0,0 +1,34 @@
/**
* Converts an RGB color to HSL (hue, saturation, lightness)
* HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
*
* @name czm_RGBToHSL
* @glslFunction
*
* @param {vec3} rgb The color in RGB.
*
* @returns {vec3} The color in HSL.
*
* @example
* vec3 hsl = czm_RGBToHSL(rgb);
* hsl.z *= 0.1;
* rgb = czm_HSLToRGB(hsl);
*/
vec3 RGBtoHCV(vec3 rgb)
{
// Based on work by Sam Hocevar and Emil Persson
vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
float c = q.x - min(q.w, q.y);
float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
return vec3(h, c, q.x);
}
vec3 czm_RGBToHSL(vec3 rgb)
{
vec3 hcv = RGBtoHCV(rgb);
float l = hcv.z - hcv.y * 0.5;
float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
return vec3(hcv.x, s, l);
}
@@ -0,0 +1,36 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Converts an RGB color to HSL (hue, saturation, lightness)\n\
* HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n\
*\n\
* @name czm_RGBToHSL\n\
* @glslFunction\n\
* \n\
* @param {vec3} rgb The color in RGB.\n\
*\n\
* @returns {vec3} The color in HSL.\n\
*\n\
* @example\n\
* vec3 hsl = czm_RGBToHSL(rgb);\n\
* hsl.z *= 0.1;\n\
* rgb = czm_HSLToRGB(hsl);\n\
*/\n\
\n\
vec3 RGBtoHCV(vec3 rgb)\n\
{\n\
// Based on work by Sam Hocevar and Emil Persson\n\
vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\n\
vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\n\
float c = q.x - min(q.w, q.y);\n\
float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n\
return vec3(h, c, q.x);\n\
}\n\
\n\
vec3 czm_RGBToHSL(vec3 rgb)\n\
{\n\
vec3 hcv = RGBtoHCV(rgb);\n\
float l = hcv.z - hcv.y * 0.5;\n\
float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n\
return vec3(hcv.x, s, l);\n\
}\n\
";
@@ -0,0 +1,30 @@
/**
* Converts an RGB color to CIE Yxy.
* <p>The conversion is described in
* {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
* </p>
*
* @name czm_RGBToXYZ
* @glslFunction
*
* @param {vec3} rgb The color in RGB.
*
* @returns {vec3} The color in CIE Yxy.
*
* @example
* vec3 xyz = czm_RGBToXYZ(rgb);
* xyz.x = max(xyz.x - luminanceThreshold, 0.0);
* rgb = czm_XYZToRGB(xyz);
*/
vec3 czm_RGBToXYZ(vec3 rgb)
{
const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
0.3576, 0.7152, 0.1192,
0.1805, 0.0722, 0.9505);
vec3 xyz = RGB2XYZ * rgb;
vec3 Yxy;
Yxy.r = xyz.g;
float temp = dot(vec3(1.0), xyz);
Yxy.gb = xyz.rg / temp;
return Yxy;
}
@@ -0,0 +1,32 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Converts an RGB color to CIE Yxy.\n\
* <p>The conversion is described in\n\
* {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n\
* </p>\n\
* \n\
* @name czm_RGBToXYZ\n\
* @glslFunction\n\
* \n\
* @param {vec3} rgb The color in RGB.\n\
*\n\
* @returns {vec3} The color in CIE Yxy.\n\
*\n\
* @example\n\
* vec3 xyz = czm_RGBToXYZ(rgb);\n\
* xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n\
* rgb = czm_XYZToRGB(xyz);\n\
*/\n\
vec3 czm_RGBToXYZ(vec3 rgb)\n\
{\n\
const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n\
0.3576, 0.7152, 0.1192,\n\
0.1805, 0.0722, 0.9505);\n\
vec3 xyz = RGB2XYZ * rgb;\n\
vec3 Yxy;\n\
Yxy.r = xyz.g;\n\
float temp = dot(vec3(1.0), xyz);\n\
Yxy.gb = xyz.rg / temp;\n\
return Yxy;\n\
}\n\
";
@@ -0,0 +1,30 @@
/**
* Converts a CIE Yxy color to RGB.
* <p>The conversion is described in
* {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
* </p>
*
* @name czm_XYZToRGB
* @glslFunction
*
* @param {vec3} Yxy The color in CIE Yxy.
*
* @returns {vec3} The color in RGB.
*
* @example
* vec3 xyz = czm_RGBToXYZ(rgb);
* xyz.x = max(xyz.x - luminanceThreshold, 0.0);
* rgb = czm_XYZToRGB(xyz);
*/
vec3 czm_XYZToRGB(vec3 Yxy)
{
const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,
-1.5371, 1.8760, -0.2040,
-0.4985, 0.0416, 1.0572);
vec3 xyz;
xyz.r = Yxy.r * Yxy.g / Yxy.b;
xyz.g = Yxy.r;
xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
return XYZ2RGB * xyz;
}
@@ -0,0 +1,32 @@
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Converts a CIE Yxy color to RGB.\n\
* <p>The conversion is described in\n\
* {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n\
* </p>\n\
* \n\
* @name czm_XYZToRGB\n\
* @glslFunction\n\
* \n\
* @param {vec3} Yxy The color in CIE Yxy.\n\
*\n\
* @returns {vec3} The color in RGB.\n\
*\n\
* @example\n\
* vec3 xyz = czm_RGBToXYZ(rgb);\n\
* xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n\
* rgb = czm_XYZToRGB(xyz);\n\
*/\n\
vec3 czm_XYZToRGB(vec3 Yxy)\n\
{\n\
const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n\
-1.5371, 1.8760, -0.2040,\n\
-0.4985, 0.0416, 1.0572);\n\
vec3 xyz;\n\
xyz.r = Yxy.r * Yxy.g / Yxy.b;\n\
xyz.g = Yxy.r;\n\
xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n\
\n\
return XYZ2RGB * xyz;\n\
}\n\
";
@@ -0,0 +1,16 @@
// See:
// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
vec3 czm_acesTonemapping(vec3 color) {
float g = 0.985;
float a = 0.065;
float b = 0.0001;
float c = 0.433;
float d = 0.238;
color = (color * (color + a) - b) / (color * (g * color + c) + d);
color = clamp(color, 0.0, 1.0);
return color;
}
@@ -0,0 +1,18 @@
//This file is automatically rebuilt by the Cesium build process.
export default "// See:\n\
// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\
\n\
vec3 czm_acesTonemapping(vec3 color) {\n\
float g = 0.985;\n\
float a = 0.065;\n\
float b = 0.0001;\n\
float c = 0.433;\n\
float d = 0.238;\n\
\n\
color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\
\n\
color = clamp(color, 0.0, 1.0);\n\
\n\
return color;\n\
}\n\
";
@@ -0,0 +1,11 @@
/**
* @private
*/
float czm_alphaWeight(float a)
{
float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
// See Weighted Blended Order-Independent Transparency for examples of different weighting functions:
// http://jcgt.org/published/0002/02/09/
return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));
}

Some files were not shown because too many files have changed in this diff Show More