Add a nearest neighbor mode to the MAP UV compositor node. #115103

Merged
Martijn Versteegh merged 32 commits from Baardaap/blender:nearest_neighbopur_compositor_uvmap into main 2024-01-19 13:24:31 +01:00
1 changed files with 7 additions and 7 deletions
Showing only changes of commit 74a0344d12 - Show all commits

View File

@ -4,19 +4,19 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_CREATE_INFO(compositor_map_uv)
GPU_SHADER_CREATE_INFO(compositor_map_uv_shared)
.local_group_size(16, 16)
.push_constant(Type::FLOAT, "gradient_attenuation_factor")
.sampler(0, ImageType::FLOAT_2D, "input_tx")
.sampler(1, ImageType::FLOAT_2D, "uv_tx")
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img");
GPU_SHADER_CREATE_INFO(compositor_map_uv)
.additional_info("compositor_map_uv_shared")
.push_constant(Type::FLOAT, "gradient_attenuation_factor")
.compute_source("compositor_map_uv.glsl")
Baardaap marked this conversation as resolved Outdated

Those two infos could be shared. See compositor_split_info.hh for an example on how to do that.

Those two infos could be shared. See `compositor_split_info.hh` for an example on how to do that.
.do_static_compilation(true);
GPU_SHADER_CREATE_INFO(compositor_map_uv_nearest_neighbour)
.local_group_size(16, 16)
.sampler(0, ImageType::FLOAT_2D, "input_tx")
.sampler(1, ImageType::FLOAT_2D, "uv_tx")
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
.additional_info("compositor_map_uv_shared")
.compute_source("compositor_map_uv_nearest_neighbour.glsl")
.do_static_compilation(true);