yzt
2023-05-26 de4278af2fd46705a40bac58ec01122db6b7f3d7
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
35
36
37
38
//This file is automatically rebuilt by the Cesium build process.
export default "void pointStage()\n\
{\n\
    gl_PointSize = 4.0;\n\
}\n\
\n\
void geometryStage(inout ProcessedAttributes attributes) \n\
{\n\
    // Compute positions in different coordinate systems\n\
    vec3 positionMC = attributes.positionMC;\n\
    v_positionMC = positionMC;\n\
    v_positionEC = (czm_modelView * vec4(positionMC, 1.0)).xyz;\n\
    gl_Position = czm_modelViewProjection * vec4(positionMC, 1.0);\n\
\n\
    // Sometimes the fragment shader needs this (e.g. custom shaders)\n\
    #ifdef COMPUTE_POSITION_WC\n\
    // Note that this is a 32-bit position which may result in jitter on small\n\
    // scales.\n\
    v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\n\
    #endif\n\
\n\
    #ifdef HAS_NORMALS\n\
    v_normalEC = czm_normal * attributes.normalMC;\n\
    #endif\n\
\n\
    #ifdef HAS_TANGENTS\n\
    v_tangentEC = normalize(czm_normal * attributes.tangentMC);    \n\
    #endif\n\
\n\
    #ifdef HAS_BITANGENTS\n\
    v_bitangentEC = normalize(czm_normal * attributes.bitangentMC);\n\
    #endif\n\
\n\
    // All other varyings need to be dynamically generated in\n\
    // GeometryPipelineStage\n\
    setDynamicVaryings(attributes);\n\
}\n\
";