2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2022-09-01 22:22:32 +02:00
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
|
* \ingroup gpu
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "gpu_shader_create_info.hh"
|
|
|
|
|
|
2025-04-11 22:39:01 +02:00
|
|
|
GPU_SHADER_INTERFACE_INFO(depth_2d_update_iface).smooth(Type::float2_t, "texCoord_interp");
|
2022-09-01 22:22:32 +02:00
|
|
|
|
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_info_base)
|
2025-04-11 22:39:01 +02:00
|
|
|
.vertex_in(0, Type::float2_t, "pos")
|
2022-09-01 22:22:32 +02:00
|
|
|
.vertex_out(depth_2d_update_iface)
|
2025-04-11 22:39:01 +02:00
|
|
|
.fragment_out(0, Type::float4_t, "fragColor")
|
|
|
|
|
.push_constant(Type::float2_t, "extent")
|
|
|
|
|
.push_constant(Type::float2_t, "offset")
|
|
|
|
|
.push_constant(Type::float2_t, "size")
|
|
|
|
|
.push_constant(Type::int_t, "mip")
|
2022-11-27 23:22:32 +01:00
|
|
|
.depth_write(DepthWrite::ANY)
|
2022-09-01 22:22:32 +02:00
|
|
|
.vertex_source("depth_2d_update_vert.glsl");
|
|
|
|
|
|
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_float)
|
2022-12-08 22:22:50 +01:00
|
|
|
.metal_backend_only(true)
|
2022-09-01 22:22:32 +02:00
|
|
|
.fragment_source("depth_2d_update_float_frag.glsl")
|
2025-04-24 14:38:13 +02:00
|
|
|
.sampler(0, ImageType::Float2D, "source_data", Frequency::PASS)
|
2022-09-01 22:22:32 +02:00
|
|
|
.additional_info("depth_2d_update_info_base")
|
2022-12-08 23:02:52 +01:00
|
|
|
.do_static_compilation(true)
|
2022-12-08 21:07:28 +01:00
|
|
|
.depth_write(DepthWrite::ANY);
|
2022-09-01 22:22:32 +02:00
|
|
|
|
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_int24)
|
2022-12-08 22:22:50 +01:00
|
|
|
.metal_backend_only(true)
|
2022-09-01 22:22:32 +02:00
|
|
|
.fragment_source("depth_2d_update_int24_frag.glsl")
|
|
|
|
|
.additional_info("depth_2d_update_info_base")
|
2025-04-24 14:38:13 +02:00
|
|
|
.sampler(0, ImageType::Int2D, "source_data", Frequency::PASS)
|
2022-12-08 23:02:52 +01:00
|
|
|
.do_static_compilation(true)
|
2022-12-08 21:07:28 +01:00
|
|
|
.depth_write(DepthWrite::ANY);
|
2022-09-01 22:22:32 +02:00
|
|
|
|
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_int32)
|
2022-12-08 22:22:50 +01:00
|
|
|
.metal_backend_only(true)
|
2022-09-01 22:22:32 +02:00
|
|
|
.fragment_source("depth_2d_update_int32_frag.glsl")
|
|
|
|
|
.additional_info("depth_2d_update_info_base")
|
2025-04-24 14:38:13 +02:00
|
|
|
.sampler(0, ImageType::Int2D, "source_data", Frequency::PASS)
|
2022-12-08 23:02:52 +01:00
|
|
|
.do_static_compilation(true)
|
2022-12-08 21:07:28 +01:00
|
|
|
.depth_write(DepthWrite::ANY);
|