Files
test2/source/blender/draw/engines/select/shaders/select_debug_frag.glsl
Clément Foucault 3f11d16501 Cleanup: DRW: Make all shader resource snake case
This make sure that the DRW folder is compliant to our codestyle.

Pull Request: https://projects.blender.org/blender/blender/pulls/137673
2025-04-24 12:50:45 +02:00

17 lines
432 B
GLSL

/* SPDX-FileCopyrightText: 2019-2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
void main()
{
uint px = texture(image, screen_uv).r;
frag_color = float4(1.0f, 1.0f, 1.0f, 0.0f);
if (px != 0u) {
frag_color.a = 1.0f;
px &= 0x3Fu;
frag_color.r = ((px >> 0) & 0x3u) / float(0x3u);
frag_color.g = ((px >> 2) & 0x3u) / float(0x3u);
frag_color.b = ((px >> 4) & 0x3u) / float(0x3u);
}
}