All files / engine/Source/Shaders/Builtin/Structs modelMaterial.js

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

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 35 36 37 38 39 40 41 42 43 44 45 46 47 48                                                                                               
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
 * Struct for representing a material for a {@link Model}. The model\n\
 * rendering pipeline will pass this struct between material, custom shaders,\n\
 * and lighting stages. This is not to be confused with {@link czm_material}\n\
 * which is used by the older Fabric materials system, although they are similar.\n\
 * <p>\n\
 * All color values (diffuse, specular, emissive) are in linear color space.\n\
 * </p>\n\
 *\n\
 * @name czm_modelMaterial\n\
 * @glslStruct\n\
 *\n\
 * @property {vec4} baseColor The base color of the material.\n\
 * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n\
 * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n\
 * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.\n\
 * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.\n\
 * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n\
 * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.\n\
 * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n\
 */\n\
struct czm_modelMaterial {\n\
    vec4 baseColor;\n\
    vec3 diffuse;\n\
    float alpha;\n\
    vec3 specular;\n\
    float roughness;\n\
    vec3 normalEC;\n\
    float occlusion;\n\
    vec3 emissive;\n\
#ifdef USE_SPECULAR\n\
    float specularWeight;\n\
#endif\n\
#ifdef USE_ANISOTROPY\n\
    vec3 anisotropicT;\n\
    vec3 anisotropicB;\n\
    float anisotropyStrength;\n\
#endif\n\
#ifdef USE_CLEARCOAT\n\
    float clearcoatFactor;\n\
    float clearcoatRoughness;\n\
    vec3 clearcoatNormal;\n\
    // Add clearcoatF0 when KHR_materials_ior is implemented\n\
#endif\n\
};\n\
";