2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2022 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2022-10-20 16:37:07 +02:00
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
|
* \ingroup gpu
|
|
|
|
|
*/
|
|
|
|
|
|
2024-11-12 18:53:34 +01:00
|
|
|
#ifdef GPU_SHADER
|
|
|
|
|
# pragma once
|
2025-09-15 17:22:19 +02:00
|
|
|
# include "gpu_shader_compat.hh"
|
2024-11-12 18:53:34 +01:00
|
|
|
|
|
|
|
|
# include "GPU_shader_shared.hh"
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-09-25 10:57:02 +02:00
|
|
|
#include "gpu_interface_infos.hh"
|
2022-10-20 16:37:07 +02:00
|
|
|
#include "gpu_shader_create_info.hh"
|
|
|
|
|
|
2025-06-03 17:34:04 +02:00
|
|
|
GPU_SHADER_CREATE_INFO(gpu_shader_icon_shared)
|
|
|
|
|
VERTEX_OUT(icon_interp_iface)
|
2025-04-11 22:39:01 +02:00
|
|
|
FRAGMENT_OUT(0, float4, fragColor)
|
|
|
|
|
PUSH_CONSTANT(float4x4, ModelViewProjectionMatrix)
|
|
|
|
|
PUSH_CONSTANT(float4, finalColor)
|
|
|
|
|
PUSH_CONSTANT(float4, rect_icon)
|
|
|
|
|
PUSH_CONSTANT(float4, rect_geom)
|
|
|
|
|
PUSH_CONSTANT(float, text_width)
|
2025-04-24 14:38:13 +02:00
|
|
|
SAMPLER(0, sampler2D, image)
|
2025-06-03 17:34:04 +02:00
|
|
|
GPU_SHADER_CREATE_END()
|
|
|
|
|
|
|
|
|
|
GPU_SHADER_CREATE_INFO(gpu_shader_icon)
|
|
|
|
|
COMPILATION_CONSTANT(bool, do_corner_masking, true)
|
2024-10-04 19:04:40 +02:00
|
|
|
VERTEX_SOURCE("gpu_shader_icon_vert.glsl")
|
|
|
|
|
FRAGMENT_SOURCE("gpu_shader_icon_frag.glsl")
|
2025-06-03 17:34:04 +02:00
|
|
|
ADDITIONAL_INFO(gpu_shader_icon_shared)
|
2024-10-04 19:04:40 +02:00
|
|
|
DO_STATIC_COMPILATION()
|
|
|
|
|
GPU_SHADER_CREATE_END()
|
2023-02-26 13:23:40 +01:00
|
|
|
|
|
|
|
|
GPU_SHADER_CREATE_INFO(gpu_shader_icon_multi)
|
2025-06-03 17:34:04 +02:00
|
|
|
COMPILATION_CONSTANT(bool, do_corner_masking, false)
|
2025-04-11 22:39:01 +02:00
|
|
|
VERTEX_IN(0, float2, pos)
|
2024-10-04 19:04:40 +02:00
|
|
|
UNIFORM_BUF(0, MultiIconCallData, multi_icon_data)
|
|
|
|
|
TYPEDEF_SOURCE("GPU_shader_shared.hh")
|
|
|
|
|
VERTEX_SOURCE("gpu_shader_icon_multi_vert.glsl")
|
|
|
|
|
FRAGMENT_SOURCE("gpu_shader_icon_frag.glsl")
|
2025-06-03 17:34:04 +02:00
|
|
|
ADDITIONAL_INFO(gpu_shader_icon_shared)
|
2024-10-04 19:04:40 +02:00
|
|
|
DO_STATIC_COMPILATION()
|
|
|
|
|
GPU_SHADER_CREATE_END()
|