yzt
2023-05-26 de4278af2fd46705a40bac58ec01122db6b7f3d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
 * Transforms a plane.\n\
 * \n\
 * @name czm_transformPlane\n\
 * @glslFunction\n\
 *\n\
 * @param {vec4} plane The plane in Hessian Normal Form.\n\
 * @param {mat4} transform The inverse-transpose of a transformation matrix.\n\
 */\n\
vec4 czm_transformPlane(vec4 plane, mat4 transform) {\n\
    vec4 transformedPlane = transform * plane;\n\
    // Convert the transformed plane to Hessian Normal Form\n\
    float normalMagnitude = length(transformedPlane.xyz);\n\
    return transformedPlane / normalMagnitude;\n\
}\n\
";