<commit_before>#pragma glslify: applyMaterial = require(./chunks/applyMaterial)
#pragma glslify: applyLight = require(./chunks/applyLight)

void main() {
    vec3 material = baseColor.r >= 0.0 ? baseColor : applyMaterial(baseColor);

    /**
     * Apply lights only if flat shading is false
     * and at least one light is added to the scene
     */
    bool lightsEnabled = (u_FlatShading == 0.0) && (u_NumLights > 0.0);
    vec3 color = lightsEnabled ? applyLight(material) : material;

    gl_FragColor = vec4(color, opacity);
}
<commit_msg>Feat: Ambience affects scene independently<commit_after>#pragma glslify: applyMaterial = require(./chunks/applyMaterial)
#pragma glslify: applyLight = require(./chunks/applyLight)

void main() {
    vec3 material = baseColor.r >= 0.0 ? baseColor : applyMaterial(baseColor);

    /**
     * Apply lights only if flat shading is false
     * and at least one light is added to the scene
     */
    bool lightsEnabled = (u_FlatShading == 0.0) && (u_NumLights > 0.0 || length(u_AmbientLight) > 0.0);
    vec3 color = lightsEnabled ? applyLight(material) : material;

    gl_FragColor = vec4(color, opacity);
}

{'fraction_non_alphanumeric': 0.1170858629661752, 'fraction_numerical': 0.017346053772766695, 'mean_word_length': 3.6910569105691056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3065245', 'n_tokens_mistral': 375, 'n_tokens_neox': 362, 'n_words': 102}