Repository: google/filament
File: tools/matc/src/matc/CommandlineConfig.cpp (C++)

Code before:
            "           MATC -PflipUV=false -PshadingModel=lit -Pname=myMat ...\n\n"
            "   --reflect, -r\n"
            "       Reflect the specified metadata as JSON: parameters\n\n"
            "   --variant-filter=<filter>, -V <filter>\n"
            "       Filter out specified comma-separated variants:\n"
            "           directionalLighting, dynamicLighting, shadowReceiver, skinning, vsm, fog,\n"
            "           ssr (screen-space reflections), stereo\n"
            "       This variant filter is merged with the filter from the material, if any.\n\n"
            "   --workarounds, -W\n"
            "       Workarounds to apply: all or none. (default is none).\n\n"
            "   --version, -v\n"
            "       Print the material version number\n\n"
            "   --output-format, -f\n"
            "       Specify output format: blob (default), header or mat.\n"
            "       When specifying the output as mat, it will return a mat\n"
            "       with #include directives resolved.\n\n"
            "   --no-insert-line-directives\n"
            "       By default insert #line directives before / after each #include.\n"
            "       Add this to omit line directives.\n\n"
            "   --no-insert-line-directive-check\n"
            "       By default it surrounds line directives with\n"
            "       #if defined(GL_GOOGLE_cpp_style_line_directive)\n"
            "       Some drivers may complain about the use of cpp style #line directives\n"
            "       if they don't support it.\n\n"
            "   --include-source-mat\n"
            "       Embeds the source ASCII material if set.\n"

            "Internal use and debugging only:\n"
            "   --optimize-none, -g, -O0\n"
            "       Disable all shader optimizations, for debugging\n\n"
            "   --preprocessor-only, -E\n"
            "       Optimize shaders by running only the preprocessor\n\n"
            "   --raw, -w\n"
            "       Compile a raw GLSL shader into a SPIRV binary chunk\n\n"
            "   --debug, -d\n"
            "       Generate extra data for debugging\n\n"
            "   --no-sampler-validation, -F\n"
            "       Skip validation of number of sampler used\n\n"
            "   --print, -t\n"
            "       Print generated shaders for debugging\n\n"
            "   --save-raw-variants, -R\n"
            "       Write the raw generated GLSL for each variant to a text file in the current directory.\n\n"
    );
    const std::string from("MATC");
    for (size_t pos = usage.find(from); pos != std::string::npos; pos = usage.find(from, pos)) {
        usage.replace(pos, from.length(), exec_name);
    }
    printf("%s", usage.c_str());
}

static void license() {

Review comment (suggestion):
We should use the noun "material definition" to refer to an uncompiled material.

```suggestion
            "       Embeds the source ASCII material definition.\n"
```

Code after:
            "           MATC -PflipUV=false -PshadingModel=lit -Pname=myMat ...\n\n"
            "   --reflect, -r\n"
            "       Reflect the specified metadata as JSON: parameters\n\n"
            "   --variant-filter=<filter>, -V <filter>\n"
            "       Filter out specified comma-separated variants:\n"
            "           directionalLighting, dynamicLighting, shadowReceiver, skinning, vsm, fog,\n"
            "           ssr (screen-space reflections), stereo\n"
            "       This variant filter is merged with the filter from the material, if any.\n\n"
            "   --workarounds, -W\n"
            "       Workarounds to apply: all or none. (default is none).\n\n"
            "   --version, -v\n"
            "       Print the material version number\n\n"
            "   --output-format, -f\n"
            "       Specify output format: blob (default), header or mat.\n"
            "       When specifying the output as mat, it will return a mat\n"
            "       with #include directives resolved.\n\n"
            "   --no-insert-line-directives\n"
            "       By default insert #line directives before / after each #include.\n"
            "       Add this to omit line directives.\n\n"
            "   --no-insert-line-directive-check\n"
            "       By default it surrounds line directives with\n"
            "       #if defined(GL_GOOGLE_cpp_style_line_directive)\n"
            "       Some drivers may complain about the use of cpp style #line directives\n"
            "       if they don't support it.\n\n"
            "   --include-source-mat\n"
            "       Embeds the source ASCII material definition if set.\n"

            "Internal use and debugging only:\n"
            "   --optimize-none, -g, -O0\n"
            "       Disable all shader optimizations, for debugging\n\n"
            "   --preprocessor-only, -E\n"
            "       Optimize shaders by running only the preprocessor\n\n"
            "   --raw, -w\n"
            "       Compile a raw GLSL shader into a SPIRV binary chunk\n\n"
            "   --debug, -d\n"
            "       Generate extra data for debugging\n\n"
            "   --no-sampler-validation, -F\n"
            "       Skip validation of number of sampler used\n\n"
            "   --print, -t\n"
            "       Print generated shaders for debugging\n\n"
            "   --save-raw-variants, -R\n"
            "       Write the raw generated GLSL for each variant to a text file in the current directory.\n\n"
    );
    const std::string from("MATC");
    for (size_t pos = usage.find(from); pos != std::string::npos; pos = usage.find(from, pos)) {
        usage.replace(pos, from.length(), exec_name);
    }
    printf("%s", usage.c_str());
}

static void license() {