Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | //This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
* Reads a value previously transformed with {@link czm_writeNonPerspective}\n\
* by dividing it by `w`, the value used in the perspective divide.\n\
* This function is intended to be called in a fragment shader to access a\n\
* `varying` that should not be subject to perspective interpolation.\n\
* For example, screen-space texture coordinates. The value should have been\n\
* previously written in the vertex shader with a call to\n\
* {@link czm_writeNonPerspective}.\n\
*\n\
* @name czm_readNonPerspective\n\
* @glslFunction\n\
*\n\
* @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n\
* @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n\
* @returns {float|vec2|vec3|vec4} The usable value.\n\
*/\n\
float czm_readNonPerspective(float value, float oneOverW) {\n\
return value * oneOverW;\n\
}\n\
\n\
vec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n\
return value * oneOverW;\n\
}\n\
\n\
vec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n\
return value * oneOverW;\n\
}\n\
\n\
vec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n\
return value * oneOverW;\n\
}\n\
";
|