2023-08-24 10:54:59 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2018-2022 Blender Authors
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2018-04-20 10:45:46 +02:00
|
|
|
|
2025-09-25 10:57:02 +02:00
|
|
|
#include "infos/overlay_facing_infos.hh"
|
2025-02-24 16:17:18 +01:00
|
|
|
|
|
|
|
|
FRAGMENT_SHADER_CREATE_INFO(overlay_facing_base)
|
|
|
|
|
|
2018-04-20 10:45:46 +02:00
|
|
|
void main()
|
|
|
|
|
{
|
2025-04-26 11:28:24 +02:00
|
|
|
frag_color = gl_FrontFacing ? theme.colors.face_front : theme.colors.face_back;
|
2024-06-06 09:43:48 +10:00
|
|
|
/* Pre-multiply the output as we do not do any blending in the frame-buffer. */
|
2025-04-24 12:50:45 +02:00
|
|
|
frag_color.rgb *= frag_color.a;
|
2018-04-20 10:45:46 +02:00
|
|
|
}
|