2023-08-24 10:54:59 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2016-2022 Blender Authors
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2017-02-07 13:04:08 +01:00
|
|
|
|
2025-09-25 10:57:02 +02:00
|
|
|
#include "infos/gpu_shader_simple_lighting_infos.hh"
|
2024-11-12 18:53:34 +01:00
|
|
|
|
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(gpu_shader_simple_lighting)
|
|
|
|
|
|
2017-02-07 13:04:08 +01:00
|
|
|
void main()
|
|
|
|
|
{
|
2022-12-09 00:10:14 +01:00
|
|
|
fragColor = simple_lighting_data.l_color;
|
2025-04-11 18:28:45 +02:00
|
|
|
fragColor.xyz *= clamp(dot(normalize(normal), simple_lighting_data.light), 0.0f, 1.0f);
|
2017-02-07 13:04:08 +01:00
|
|
|
}
|