CESIUM内置shader变量和函数[转]
cesium中内置了一些常量、变量和函数,在vs和fs中可直接使用。 内置uniform 内置uniform主要置于AutomaticUniforms类里面,该类私有未开放文档。 czm_backgroundColor An automatic GLSL uniform representing the current scene background color. Example: // GLSL declaration uniform vec4 czm_backgroundColor; // Example: If the given color's RGB matches the background color, invert it. vec4 adjustColorForContrast(vec4 color) { if (czm_backgroundColor.rgb == color.rgb) { color.rgb = vec3(1.0) - color.rgb; } return color; } czm_brdfLut An automatic GLSL uniform containing the BRDF look up texture used for image-based lighting computations. Example: // GLSL