aboutsummaryrefslogtreecommitdiffstats
path: root/src/runtimerender/res/effectlib/funcdiffuseReflectionBSDF.glsllib
blob: 865033a6d97b528d24ec5906b14660a621ab61ed (plain)
1
2
3
4
5
6
7
8
9
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

// All our vectors have been normalized
vec4 qt_diffuseReflectionBSDF(in vec3 N, in vec3 L, in vec3 lightDiffuse)
{
    float factor = max(0.0, dot(N, L));
    return vec4(factor * lightDiffuse, 1.0);
}