forked from blender/blender
GPU: Shader Create Info GLSL-C++ stubs #3
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_alpha_crop)
|
GPU_SHADER_CREATE_INFO(compositor_alpha_crop)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::IVEC2, "lower_bound")
|
PUSH_CONSTANT(IVEC2, lower_bound)
|
||||||
.push_constant(Type::IVEC2, "upper_bound")
|
PUSH_CONSTANT(IVEC2, upper_bound)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_alpha_crop.glsl")
|
COMPUTE_SOURCE("compositor_alpha_crop.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_bilateral_blur)
|
GPU_SHADER_CREATE_INFO(compositor_bilateral_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "radius")
|
PUSH_CONSTANT(INT, radius)
|
||||||
.push_constant(Type::FLOAT, "threshold")
|
PUSH_CONSTANT(FLOAT, threshold)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "determinator_tx")
|
SAMPLER(1, FLOAT_2D, determinator_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_bilateral_blur.glsl")
|
COMPUTE_SOURCE("compositor_bilateral_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,12 +5,13 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_bokeh_blur)
|
GPU_SHADER_CREATE_INFO(compositor_bokeh_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "radius")
|
PUSH_CONSTANT(INT, radius)
|
||||||
.push_constant(Type::BOOL, "extend_bounds")
|
PUSH_CONSTANT(BOOL, extend_bounds)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "weights_tx")
|
SAMPLER(1, FLOAT_2D, weights_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "mask_tx")
|
SAMPLER(2, FLOAT_2D, mask_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_bokeh_blur.glsl")
|
COMPUTE_SOURCE("compositor_bokeh_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,13 +5,14 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_bokeh_blur_variable_size)
|
GPU_SHADER_CREATE_INFO(compositor_bokeh_blur_variable_size)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "base_size")
|
PUSH_CONSTANT(FLOAT, base_size)
|
||||||
.push_constant(Type::INT, "search_radius")
|
PUSH_CONSTANT(INT, search_radius)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "weights_tx")
|
SAMPLER(1, FLOAT_2D, weights_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "size_tx")
|
SAMPLER(2, FLOAT_2D, size_tx)
|
||||||
.sampler(3, ImageType::FLOAT_2D, "mask_tx")
|
SAMPLER(3, FLOAT_2D, mask_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_bokeh_blur_variable_size.glsl")
|
COMPUTE_SOURCE("compositor_bokeh_blur_variable_size.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,12 +5,13 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_bokeh_image)
|
GPU_SHADER_CREATE_INFO(compositor_bokeh_image)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "exterior_angle")
|
PUSH_CONSTANT(FLOAT, exterior_angle)
|
||||||
.push_constant(Type::FLOAT, "rotation")
|
PUSH_CONSTANT(FLOAT, rotation)
|
||||||
.push_constant(Type::FLOAT, "roundness")
|
PUSH_CONSTANT(FLOAT, roundness)
|
||||||
.push_constant(Type::FLOAT, "catadioptric")
|
PUSH_CONSTANT(FLOAT, catadioptric)
|
||||||
.push_constant(Type::FLOAT, "lens_shift")
|
PUSH_CONSTANT(FLOAT, lens_shift)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_bokeh_image.glsl")
|
COMPUTE_SOURCE("compositor_bokeh_image.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,33 +5,38 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_box_mask_shared)
|
GPU_SHADER_CREATE_INFO(compositor_box_mask_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::IVEC2, "domain_size")
|
PUSH_CONSTANT(IVEC2, domain_size)
|
||||||
.push_constant(Type::VEC2, "location")
|
PUSH_CONSTANT(VEC2, location)
|
||||||
.push_constant(Type::VEC2, "size")
|
PUSH_CONSTANT(VEC2, size)
|
||||||
.push_constant(Type::FLOAT, "cos_angle")
|
PUSH_CONSTANT(FLOAT, cos_angle)
|
||||||
.push_constant(Type::FLOAT, "sin_angle")
|
PUSH_CONSTANT(FLOAT, sin_angle)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "base_mask_tx")
|
SAMPLER(0, FLOAT_2D, base_mask_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "mask_value_tx")
|
SAMPLER(1, FLOAT_2D, mask_value_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_mask_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_mask_img)
|
||||||
.compute_source("compositor_box_mask.glsl");
|
COMPUTE_SOURCE("compositor_box_mask.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_box_mask_add)
|
GPU_SHADER_CREATE_INFO(compositor_box_mask_add)
|
||||||
.additional_info("compositor_box_mask_shared")
|
ADDITIONAL_INFO(compositor_box_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_ADD")
|
DEFINE("CMP_NODE_MASKTYPE_ADD")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_box_mask_subtract)
|
GPU_SHADER_CREATE_INFO(compositor_box_mask_subtract)
|
||||||
.additional_info("compositor_box_mask_shared")
|
ADDITIONAL_INFO(compositor_box_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_SUBTRACT")
|
DEFINE("CMP_NODE_MASKTYPE_SUBTRACT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_box_mask_multiply)
|
GPU_SHADER_CREATE_INFO(compositor_box_mask_multiply)
|
||||||
.additional_info("compositor_box_mask_shared")
|
ADDITIONAL_INFO(compositor_box_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_MULTIPLY")
|
DEFINE("CMP_NODE_MASKTYPE_MULTIPLY")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_box_mask_not)
|
GPU_SHADER_CREATE_INFO(compositor_box_mask_not)
|
||||||
.additional_info("compositor_box_mask_shared")
|
ADDITIONAL_INFO(compositor_box_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_NOT")
|
DEFINE("CMP_NODE_MASKTYPE_NOT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_compute_preview)
|
GPU_SHADER_CREATE_INFO(compositor_compute_preview)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "preview_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, preview_img)
|
||||||
.compute_source("compositor_compute_preview.glsl")
|
COMPUTE_SOURCE("compositor_compute_preview.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,67 +5,78 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_shared)
|
GPU_SHADER_CREATE_INFO(compositor_convert_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.typedef_source("gpu_shader_compositor_type_conversion.glsl")
|
TYPEDEF_SOURCE("gpu_shader_compositor_type_conversion.glsl")
|
||||||
.compute_source("compositor_convert.glsl");
|
COMPUTE_SOURCE("compositor_convert.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_float_to_float)
|
GPU_SHADER_CREATE_INFO(compositor_convert_float_to_float)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "value")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_float_to_vector)
|
GPU_SHADER_CREATE_INFO(compositor_convert_float_to_vector)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "vec4(vec3_from_float(value.x), 1.0)")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "vec4(vec3_from_float(value.x), 1.0)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_float_to_color)
|
GPU_SHADER_CREATE_INFO(compositor_convert_float_to_color)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "vec4_from_float(value.x)")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "vec4_from_float(value.x)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_float)
|
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_float)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "vec4(float_from_vec4(value), vec3(0.0))")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "vec4(float_from_vec4(value), vec3(0.0))")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_vector)
|
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_vector)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "value")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_color)
|
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_color)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "value")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_vector_to_float)
|
GPU_SHADER_CREATE_INFO(compositor_convert_vector_to_float)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "vec4(float_from_vec3(value.xyz), vec3(0.0))")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "vec4(float_from_vec3(value.xyz), vec3(0.0))")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_vector_to_vector)
|
GPU_SHADER_CREATE_INFO(compositor_convert_vector_to_vector)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "value")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_vector_to_color)
|
GPU_SHADER_CREATE_INFO(compositor_convert_vector_to_color)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "vec4_from_vec3(value.xyz)")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "vec4_from_vec3(value.xyz)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_alpha)
|
GPU_SHADER_CREATE_INFO(compositor_convert_color_to_alpha)
|
||||||
.additional_info("compositor_convert_shared")
|
ADDITIONAL_INFO(compositor_convert_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("CONVERT_EXPRESSION(value)", "vec4(value.a)")
|
DEFINE_VALUE("CONVERT_EXPRESSION(value)", "vec4(value.a)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,25 +5,28 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_cryptomatte_pick)
|
GPU_SHADER_CREATE_INFO(compositor_cryptomatte_pick)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "first_layer_tx")
|
SAMPLER(0, FLOAT_2D, first_layer_tx)
|
||||||
.image(0, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA32F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_cryptomatte_pick.glsl")
|
COMPUTE_SOURCE("compositor_cryptomatte_pick.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_cryptomatte_matte)
|
GPU_SHADER_CREATE_INFO(compositor_cryptomatte_matte)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "identifiers_count")
|
PUSH_CONSTANT(INT, identifiers_count)
|
||||||
.push_constant(Type::FLOAT, "identifiers", 32)
|
PUSH_CONSTANT_ARRAY(FLOAT, identifiers, 32)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "layer_tx")
|
SAMPLER(0, FLOAT_2D, layer_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "matte_img")
|
IMAGE(0, GPU_R16F, READ_WRITE, FLOAT_2D, matte_img)
|
||||||
.compute_source("compositor_cryptomatte_matte.glsl")
|
COMPUTE_SOURCE("compositor_cryptomatte_matte.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_cryptomatte_image)
|
GPU_SHADER_CREATE_INFO(compositor_cryptomatte_image)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "matte_tx")
|
SAMPLER(1, FLOAT_2D, matte_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_cryptomatte_image.glsl")
|
COMPUTE_SOURCE("compositor_cryptomatte_image.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,33 +5,36 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_defocus_radius_from_scale)
|
GPU_SHADER_CREATE_INFO(compositor_defocus_radius_from_scale)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "scale")
|
PUSH_CONSTANT(FLOAT, scale)
|
||||||
.push_constant(Type::FLOAT, "max_radius")
|
PUSH_CONSTANT(FLOAT, max_radius)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "radius_tx")
|
SAMPLER(0, FLOAT_2D, radius_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "radius_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, radius_img)
|
||||||
.compute_source("compositor_defocus_radius_from_scale.glsl")
|
COMPUTE_SOURCE("compositor_defocus_radius_from_scale.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_defocus_radius_from_depth)
|
GPU_SHADER_CREATE_INFO(compositor_defocus_radius_from_depth)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "f_stop")
|
PUSH_CONSTANT(FLOAT, f_stop)
|
||||||
.push_constant(Type::FLOAT, "max_radius")
|
PUSH_CONSTANT(FLOAT, max_radius)
|
||||||
.push_constant(Type::FLOAT, "focal_length")
|
PUSH_CONSTANT(FLOAT, focal_length)
|
||||||
.push_constant(Type::FLOAT, "pixels_per_meter")
|
PUSH_CONSTANT(FLOAT, pixels_per_meter)
|
||||||
.push_constant(Type::FLOAT, "distance_to_image_of_focus")
|
PUSH_CONSTANT(FLOAT, distance_to_image_of_focus)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "depth_tx")
|
SAMPLER(0, FLOAT_2D, depth_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "radius_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, radius_img)
|
||||||
.compute_source("compositor_defocus_radius_from_depth.glsl")
|
COMPUTE_SOURCE("compositor_defocus_radius_from_depth.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_defocus_blur)
|
GPU_SHADER_CREATE_INFO(compositor_defocus_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "gamma_correct")
|
PUSH_CONSTANT(BOOL, gamma_correct)
|
||||||
.push_constant(Type::INT, "search_radius")
|
PUSH_CONSTANT(INT, search_radius)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "weights_tx")
|
SAMPLER(1, FLOAT_2D, weights_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "radius_tx")
|
SAMPLER(2, FLOAT_2D, radius_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_defocus_blur.glsl")
|
COMPUTE_SOURCE("compositor_defocus_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,22 +5,24 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_deriche_gaussian_blur)
|
GPU_SHADER_CREATE_INFO(compositor_deriche_gaussian_blur)
|
||||||
.local_group_size(128, 2)
|
LOCAL_GROUP_SIZE(128, 2)
|
||||||
.push_constant(Type::VEC4, "causal_feedforward_coefficients")
|
PUSH_CONSTANT(VEC4, causal_feedforward_coefficients)
|
||||||
.push_constant(Type::VEC4, "non_causal_feedforward_coefficients")
|
PUSH_CONSTANT(VEC4, non_causal_feedforward_coefficients)
|
||||||
.push_constant(Type::VEC4, "feedback_coefficients")
|
PUSH_CONSTANT(VEC4, feedback_coefficients)
|
||||||
.push_constant(Type::FLOAT, "causal_boundary_coefficient")
|
PUSH_CONSTANT(FLOAT, causal_boundary_coefficient)
|
||||||
.push_constant(Type::FLOAT, "non_causal_boundary_coefficient")
|
PUSH_CONSTANT(FLOAT, non_causal_boundary_coefficient)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "causal_output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, causal_output_img)
|
||||||
.image(1, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "non_causal_output_img")
|
IMAGE(1, GPU_RGBA16F, WRITE, FLOAT_2D, non_causal_output_img)
|
||||||
.compute_source("compositor_deriche_gaussian_blur.glsl")
|
COMPUTE_SOURCE("compositor_deriche_gaussian_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_deriche_gaussian_blur_sum)
|
GPU_SHADER_CREATE_INFO(compositor_deriche_gaussian_blur_sum)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "causal_input_tx")
|
SAMPLER(0, FLOAT_2D, causal_input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "non_causal_input_tx")
|
SAMPLER(1, FLOAT_2D, non_causal_input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_deriche_gaussian_blur_sum.glsl")
|
COMPUTE_SOURCE("compositor_deriche_gaussian_blur_sum.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_despeckle)
|
GPU_SHADER_CREATE_INFO(compositor_despeckle)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "threshold")
|
PUSH_CONSTANT(FLOAT, threshold)
|
||||||
.push_constant(Type::FLOAT, "neighbor_threshold")
|
PUSH_CONSTANT(FLOAT, neighbor_threshold)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "factor_tx")
|
SAMPLER(1, FLOAT_2D, factor_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_despeckle.glsl")
|
COMPUTE_SOURCE("compositor_despeckle.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_directional_blur)
|
GPU_SHADER_CREATE_INFO(compositor_directional_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "iterations")
|
PUSH_CONSTANT(INT, iterations)
|
||||||
.push_constant(Type::VEC2, "origin")
|
PUSH_CONSTANT(VEC2, origin)
|
||||||
.push_constant(Type::VEC2, "translation")
|
PUSH_CONSTANT(VEC2, translation)
|
||||||
.push_constant(Type::FLOAT, "rotation_sin")
|
PUSH_CONSTANT(FLOAT, rotation_sin)
|
||||||
.push_constant(Type::FLOAT, "rotation_cos")
|
PUSH_CONSTANT(FLOAT, rotation_cos)
|
||||||
.push_constant(Type::FLOAT, "scale")
|
PUSH_CONSTANT(FLOAT, scale)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_directional_blur.glsl")
|
COMPUTE_SOURCE("compositor_directional_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_displace)
|
GPU_SHADER_CREATE_INFO(compositor_displace)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "displacement_tx")
|
SAMPLER(1, FLOAT_2D, displacement_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "x_scale_tx")
|
SAMPLER(2, FLOAT_2D, x_scale_tx)
|
||||||
.sampler(3, ImageType::FLOAT_2D, "y_scale_tx")
|
SAMPLER(3, FLOAT_2D, y_scale_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_displace.glsl")
|
COMPUTE_SOURCE("compositor_displace.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,22 +5,24 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_double_edge_mask_compute_boundary)
|
GPU_SHADER_CREATE_INFO(compositor_double_edge_mask_compute_boundary)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "include_all_inner_edges")
|
PUSH_CONSTANT(BOOL, include_all_inner_edges)
|
||||||
.push_constant(Type::BOOL, "include_edges_of_image")
|
PUSH_CONSTANT(BOOL, include_edges_of_image)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "inner_mask_tx")
|
SAMPLER(0, FLOAT_2D, inner_mask_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "outer_mask_tx")
|
SAMPLER(1, FLOAT_2D, outer_mask_tx)
|
||||||
.image(0, GPU_RG16I, Qualifier::WRITE, ImageType::INT_2D, "inner_boundary_img")
|
IMAGE(0, GPU_RG16I, WRITE, INT_2D, inner_boundary_img)
|
||||||
.image(1, GPU_RG16I, Qualifier::WRITE, ImageType::INT_2D, "outer_boundary_img")
|
IMAGE(1, GPU_RG16I, WRITE, INT_2D, outer_boundary_img)
|
||||||
.compute_source("compositor_double_edge_mask_compute_boundary.glsl")
|
COMPUTE_SOURCE("compositor_double_edge_mask_compute_boundary.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_double_edge_mask_compute_gradient)
|
GPU_SHADER_CREATE_INFO(compositor_double_edge_mask_compute_gradient)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "inner_mask_tx")
|
SAMPLER(0, FLOAT_2D, inner_mask_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "outer_mask_tx")
|
SAMPLER(1, FLOAT_2D, outer_mask_tx)
|
||||||
.sampler(2, ImageType::INT_2D, "flooded_inner_boundary_tx")
|
SAMPLER(2, INT_2D, flooded_inner_boundary_tx)
|
||||||
.sampler(3, ImageType::INT_2D, "flooded_outer_boundary_tx")
|
SAMPLER(3, INT_2D, flooded_outer_boundary_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_double_edge_mask_compute_gradient.glsl")
|
COMPUTE_SOURCE("compositor_double_edge_mask_compute_gradient.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_edge_filter)
|
GPU_SHADER_CREATE_INFO(compositor_edge_filter)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::MAT4, "ukernel")
|
PUSH_CONSTANT(MAT4, ukernel)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "factor_tx")
|
SAMPLER(1, FLOAT_2D, factor_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_edge_filter.glsl")
|
COMPUTE_SOURCE("compositor_edge_filter.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,33 +5,38 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_shared)
|
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::IVEC2, "domain_size")
|
PUSH_CONSTANT(IVEC2, domain_size)
|
||||||
.push_constant(Type::VEC2, "location")
|
PUSH_CONSTANT(VEC2, location)
|
||||||
.push_constant(Type::VEC2, "radius")
|
PUSH_CONSTANT(VEC2, radius)
|
||||||
.push_constant(Type::FLOAT, "cos_angle")
|
PUSH_CONSTANT(FLOAT, cos_angle)
|
||||||
.push_constant(Type::FLOAT, "sin_angle")
|
PUSH_CONSTANT(FLOAT, sin_angle)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "base_mask_tx")
|
SAMPLER(0, FLOAT_2D, base_mask_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "mask_value_tx")
|
SAMPLER(1, FLOAT_2D, mask_value_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_mask_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_mask_img)
|
||||||
.compute_source("compositor_ellipse_mask.glsl");
|
COMPUTE_SOURCE("compositor_ellipse_mask.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_add)
|
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_add)
|
||||||
.additional_info("compositor_ellipse_mask_shared")
|
ADDITIONAL_INFO(compositor_ellipse_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_ADD")
|
DEFINE("CMP_NODE_MASKTYPE_ADD")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_subtract)
|
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_subtract)
|
||||||
.additional_info("compositor_ellipse_mask_shared")
|
ADDITIONAL_INFO(compositor_ellipse_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_SUBTRACT")
|
DEFINE("CMP_NODE_MASKTYPE_SUBTRACT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_multiply)
|
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_multiply)
|
||||||
.additional_info("compositor_ellipse_mask_shared")
|
ADDITIONAL_INFO(compositor_ellipse_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_MULTIPLY")
|
DEFINE("CMP_NODE_MASKTYPE_MULTIPLY")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_not)
|
GPU_SHADER_CREATE_INFO(compositor_ellipse_mask_not)
|
||||||
.additional_info("compositor_ellipse_mask_shared")
|
ADDITIONAL_INFO(compositor_ellipse_mask_shared)
|
||||||
.define("CMP_NODE_MASKTYPE_NOT")
|
DEFINE("CMP_NODE_MASKTYPE_NOT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_filter)
|
GPU_SHADER_CREATE_INFO(compositor_filter)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::MAT4, "ukernel")
|
PUSH_CONSTANT(MAT4, ukernel)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "factor_tx")
|
SAMPLER(1, FLOAT_2D, factor_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_filter.glsl")
|
COMPUTE_SOURCE("compositor_filter.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_flip)
|
GPU_SHADER_CREATE_INFO(compositor_flip)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "flip_x")
|
PUSH_CONSTANT(BOOL, flip_x)
|
||||||
.push_constant(Type::BOOL, "flip_y")
|
PUSH_CONSTANT(BOOL, flip_y)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_flip.glsl")
|
COMPUTE_SOURCE("compositor_flip.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -9,126 +9,140 @@
|
|||||||
* ------- */
|
* ------- */
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_highlights)
|
GPU_SHADER_CREATE_INFO(compositor_glare_highlights)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "threshold")
|
PUSH_CONSTANT(FLOAT, threshold)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_glare_highlights.glsl")
|
COMPUTE_SOURCE("compositor_glare_highlights.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_mix)
|
GPU_SHADER_CREATE_INFO(compositor_glare_mix)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "mix_factor")
|
PUSH_CONSTANT(FLOAT, mix_factor)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "glare_tx")
|
SAMPLER(1, FLOAT_2D, glare_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_glare_mix.glsl")
|
COMPUTE_SOURCE("compositor_glare_mix.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* ------------
|
/* ------------
|
||||||
* Ghost Glare.
|
* Ghost Glare.
|
||||||
* ------------ */
|
* ------------ */
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_ghost_base)
|
GPU_SHADER_CREATE_INFO(compositor_glare_ghost_base)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "small_ghost_tx")
|
SAMPLER(0, FLOAT_2D, small_ghost_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "big_ghost_tx")
|
SAMPLER(1, FLOAT_2D, big_ghost_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "combined_ghost_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, combined_ghost_img)
|
||||||
.compute_source("compositor_glare_ghost_base.glsl")
|
COMPUTE_SOURCE("compositor_glare_ghost_base.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_ghost_accumulate)
|
GPU_SHADER_CREATE_INFO(compositor_glare_ghost_accumulate)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::VEC4, "scales")
|
PUSH_CONSTANT(VEC4, scales)
|
||||||
.push_constant(Type::VEC4, "color_modulators", 4)
|
PUSH_CONSTANT_ARRAY(VEC4, color_modulators, 4)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_ghost_tx")
|
SAMPLER(0, FLOAT_2D, input_ghost_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "accumulated_ghost_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, accumulated_ghost_img)
|
||||||
.compute_source("compositor_glare_ghost_accumulate.glsl")
|
COMPUTE_SOURCE("compositor_glare_ghost_accumulate.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* -----------
|
/* -----------
|
||||||
* Simple Star
|
* Simple Star
|
||||||
* ----------- */
|
* ----------- */
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_horizontal_pass)
|
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_horizontal_pass)
|
||||||
.local_group_size(16)
|
LOCAL_GROUP_SIZE(16)
|
||||||
.push_constant(Type::INT, "iterations")
|
PUSH_CONSTANT(INT, iterations)
|
||||||
.push_constant(Type::FLOAT, "fade_factor")
|
PUSH_CONSTANT(FLOAT, fade_factor)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "horizontal_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, horizontal_img)
|
||||||
.compute_source("compositor_glare_simple_star_horizontal_pass.glsl")
|
COMPUTE_SOURCE("compositor_glare_simple_star_horizontal_pass.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_vertical_pass)
|
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_vertical_pass)
|
||||||
.local_group_size(16)
|
LOCAL_GROUP_SIZE(16)
|
||||||
.push_constant(Type::INT, "iterations")
|
PUSH_CONSTANT(INT, iterations)
|
||||||
.push_constant(Type::FLOAT, "fade_factor")
|
PUSH_CONSTANT(FLOAT, fade_factor)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "horizontal_tx")
|
SAMPLER(0, FLOAT_2D, horizontal_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "vertical_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, vertical_img)
|
||||||
.compute_source("compositor_glare_simple_star_vertical_pass.glsl")
|
COMPUTE_SOURCE("compositor_glare_simple_star_vertical_pass.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_diagonal_pass)
|
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_diagonal_pass)
|
||||||
.local_group_size(16)
|
LOCAL_GROUP_SIZE(16)
|
||||||
.push_constant(Type::INT, "iterations")
|
PUSH_CONSTANT(INT, iterations)
|
||||||
.push_constant(Type::FLOAT, "fade_factor")
|
PUSH_CONSTANT(FLOAT, fade_factor)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "diagonal_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, diagonal_img)
|
||||||
.compute_source("compositor_glare_simple_star_diagonal_pass.glsl")
|
COMPUTE_SOURCE("compositor_glare_simple_star_diagonal_pass.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_anti_diagonal_pass)
|
GPU_SHADER_CREATE_INFO(compositor_glare_simple_star_anti_diagonal_pass)
|
||||||
.local_group_size(16)
|
LOCAL_GROUP_SIZE(16)
|
||||||
.push_constant(Type::INT, "iterations")
|
PUSH_CONSTANT(INT, iterations)
|
||||||
.push_constant(Type::FLOAT, "fade_factor")
|
PUSH_CONSTANT(FLOAT, fade_factor)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "diagonal_tx")
|
SAMPLER(0, FLOAT_2D, diagonal_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "anti_diagonal_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, anti_diagonal_img)
|
||||||
.compute_source("compositor_glare_simple_star_anti_diagonal_pass.glsl")
|
COMPUTE_SOURCE("compositor_glare_simple_star_anti_diagonal_pass.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* -------
|
/* -------
|
||||||
* Streaks
|
* Streaks
|
||||||
* ------- */
|
* ------- */
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_streaks_filter)
|
GPU_SHADER_CREATE_INFO(compositor_glare_streaks_filter)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "color_modulator")
|
PUSH_CONSTANT(FLOAT, color_modulator)
|
||||||
.push_constant(Type::VEC3, "fade_factors")
|
PUSH_CONSTANT(VEC3, fade_factors)
|
||||||
.push_constant(Type::VEC2, "streak_vector")
|
PUSH_CONSTANT(VEC2, streak_vector)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_streak_tx")
|
SAMPLER(0, FLOAT_2D, input_streak_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_streak_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_streak_img)
|
||||||
.compute_source("compositor_glare_streaks_filter.glsl")
|
COMPUTE_SOURCE("compositor_glare_streaks_filter.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_streaks_accumulate)
|
GPU_SHADER_CREATE_INFO(compositor_glare_streaks_accumulate)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "attenuation_factor")
|
PUSH_CONSTANT(FLOAT, attenuation_factor)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "streak_tx")
|
SAMPLER(0, FLOAT_2D, streak_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "accumulated_streaks_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, accumulated_streaks_img)
|
||||||
.compute_source("compositor_glare_streaks_accumulate.glsl")
|
COMPUTE_SOURCE("compositor_glare_streaks_accumulate.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* -----
|
/* -----
|
||||||
* Bloom
|
* Bloom
|
||||||
* ----- */
|
* ----- */
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_downsample_shared)
|
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_downsample_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_glare_bloom_downsample.glsl");
|
COMPUTE_SOURCE("compositor_glare_bloom_downsample.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_downsample_simple_average)
|
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_downsample_simple_average)
|
||||||
.define("SIMPLE_AVERAGE")
|
DEFINE("SIMPLE_AVERAGE")
|
||||||
.additional_info("compositor_glare_bloom_downsample_shared")
|
ADDITIONAL_INFO(compositor_glare_bloom_downsample_shared)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_downsample_karis_average)
|
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_downsample_karis_average)
|
||||||
.define("KARIS_AVERAGE")
|
DEFINE("KARIS_AVERAGE")
|
||||||
.additional_info("compositor_glare_bloom_downsample_shared")
|
ADDITIONAL_INFO(compositor_glare_bloom_downsample_shared)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_upsample)
|
GPU_SHADER_CREATE_INFO(compositor_glare_bloom_upsample)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, READ_WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_glare_bloom_upsample.glsl")
|
COMPUTE_SOURCE("compositor_glare_bloom_upsample.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_id_mask)
|
GPU_SHADER_CREATE_INFO(compositor_id_mask)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "index")
|
PUSH_CONSTANT(INT, index)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_mask_tx")
|
SAMPLER(0, FLOAT_2D, input_mask_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_mask_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_mask_img)
|
||||||
.compute_source("compositor_id_mask.glsl")
|
COMPUTE_SOURCE("compositor_id_mask.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_image_crop)
|
GPU_SHADER_CREATE_INFO(compositor_image_crop)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::IVEC2, "lower_bound")
|
PUSH_CONSTANT(IVEC2, lower_bound)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_image_crop.glsl")
|
COMPUTE_SOURCE("compositor_image_crop.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,29 +5,32 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_inpaint_compute_boundary)
|
GPU_SHADER_CREATE_INFO(compositor_inpaint_compute_boundary)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RG16I, Qualifier::WRITE, ImageType::INT_2D, "boundary_img")
|
IMAGE(0, GPU_RG16I, WRITE, INT_2D, boundary_img)
|
||||||
.compute_source("compositor_inpaint_compute_boundary.glsl")
|
COMPUTE_SOURCE("compositor_inpaint_compute_boundary.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_inpaint_fill_region)
|
GPU_SHADER_CREATE_INFO(compositor_inpaint_fill_region)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "max_distance")
|
PUSH_CONSTANT(INT, max_distance)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::INT_2D, "flooded_boundary_tx")
|
SAMPLER(1, INT_2D, flooded_boundary_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "filled_region_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, filled_region_img)
|
||||||
.image(1, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "distance_to_boundary_img")
|
IMAGE(1, GPU_R16F, WRITE, FLOAT_2D, distance_to_boundary_img)
|
||||||
.image(2, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "smoothing_radius_img")
|
IMAGE(2, GPU_R16F, WRITE, FLOAT_2D, smoothing_radius_img)
|
||||||
.compute_source("compositor_inpaint_fill_region.glsl")
|
COMPUTE_SOURCE("compositor_inpaint_fill_region.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_inpaint_compute_region)
|
GPU_SHADER_CREATE_INFO(compositor_inpaint_compute_region)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "max_distance")
|
PUSH_CONSTANT(INT, max_distance)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "inpainted_region_tx")
|
SAMPLER(1, FLOAT_2D, inpainted_region_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "distance_to_boundary_tx")
|
SAMPLER(2, FLOAT_2D, distance_to_boundary_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_inpaint_compute_region.glsl")
|
COMPUTE_SOURCE("compositor_inpaint_compute_region.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_jump_flooding)
|
GPU_SHADER_CREATE_INFO(compositor_jump_flooding)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "step_size")
|
PUSH_CONSTANT(INT, step_size)
|
||||||
.sampler(0, ImageType::INT_2D, "input_tx")
|
SAMPLER(0, INT_2D, input_tx)
|
||||||
.image(0, GPU_RG16I, Qualifier::WRITE, ImageType::INT_2D, "output_img")
|
IMAGE(0, GPU_RG16I, WRITE, INT_2D, output_img)
|
||||||
.compute_source("compositor_jump_flooding.glsl")
|
COMPUTE_SOURCE("compositor_jump_flooding.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,53 +5,58 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_keying_extract_chroma)
|
GPU_SHADER_CREATE_INFO(compositor_keying_extract_chroma)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_keying_extract_chroma.glsl")
|
COMPUTE_SOURCE("compositor_keying_extract_chroma.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_keying_replace_chroma)
|
GPU_SHADER_CREATE_INFO(compositor_keying_replace_chroma)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "new_chroma_tx")
|
SAMPLER(1, FLOAT_2D, new_chroma_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_keying_replace_chroma.glsl")
|
COMPUTE_SOURCE("compositor_keying_replace_chroma.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_keying_compute_matte)
|
GPU_SHADER_CREATE_INFO(compositor_keying_compute_matte)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "key_balance")
|
PUSH_CONSTANT(FLOAT, key_balance)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "key_tx")
|
SAMPLER(1, FLOAT_2D, key_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_keying_compute_matte.glsl")
|
COMPUTE_SOURCE("compositor_keying_compute_matte.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte)
|
GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "compute_edges")
|
PUSH_CONSTANT(BOOL, compute_edges)
|
||||||
.push_constant(Type::BOOL, "apply_core_matte")
|
PUSH_CONSTANT(BOOL, apply_core_matte)
|
||||||
.push_constant(Type::BOOL, "apply_garbage_matte")
|
PUSH_CONSTANT(BOOL, apply_garbage_matte)
|
||||||
.push_constant(Type::INT, "edge_search_radius")
|
PUSH_CONSTANT(INT, edge_search_radius)
|
||||||
.push_constant(Type::FLOAT, "edge_tolerance")
|
PUSH_CONSTANT(FLOAT, edge_tolerance)
|
||||||
.push_constant(Type::FLOAT, "black_level")
|
PUSH_CONSTANT(FLOAT, black_level)
|
||||||
.push_constant(Type::FLOAT, "white_level")
|
PUSH_CONSTANT(FLOAT, white_level)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_matte_tx")
|
SAMPLER(0, FLOAT_2D, input_matte_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "garbage_matte_tx")
|
SAMPLER(1, FLOAT_2D, garbage_matte_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "core_matte_tx")
|
SAMPLER(2, FLOAT_2D, core_matte_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_matte_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_matte_img)
|
||||||
.image(1, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_edges_img")
|
IMAGE(1, GPU_R16F, WRITE, FLOAT_2D, output_edges_img)
|
||||||
.compute_source("compositor_keying_tweak_matte.glsl")
|
COMPUTE_SOURCE("compositor_keying_tweak_matte.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_keying_compute_image)
|
GPU_SHADER_CREATE_INFO(compositor_keying_compute_image)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "despill_factor")
|
PUSH_CONSTANT(FLOAT, despill_factor)
|
||||||
.push_constant(Type::FLOAT, "despill_balance")
|
PUSH_CONSTANT(FLOAT, despill_balance)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "matte_tx")
|
SAMPLER(1, FLOAT_2D, matte_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "key_tx")
|
SAMPLER(2, FLOAT_2D, key_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_keying_compute_image.glsl")
|
COMPUTE_SOURCE("compositor_keying_compute_image.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_keying_screen)
|
GPU_SHADER_CREATE_INFO(compositor_keying_screen)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "smoothness")
|
PUSH_CONSTANT(FLOAT, smoothness)
|
||||||
.push_constant(Type::INT, "number_of_markers")
|
PUSH_CONSTANT(INT, number_of_markers)
|
||||||
.storage_buf(0, Qualifier::READ, "vec2", "marker_positions[]")
|
STORAGE_BUF(0, READ, vec2, marker_positions[])
|
||||||
.storage_buf(1, Qualifier::READ, "vec4", "marker_colors[]")
|
STORAGE_BUF(1, READ, vec4, marker_colors[])
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_keying_screen.glsl")
|
COMPUTE_SOURCE("compositor_keying_screen.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,68 +5,79 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_shared)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_kuwahara_classic.glsl");
|
COMPUTE_SOURCE("compositor_kuwahara_classic.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_convolution_shared)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_convolution_shared)
|
||||||
.additional_info("compositor_kuwahara_classic_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_classic_shared)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx");
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_convolution_constant_size)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_convolution_constant_size)
|
||||||
.additional_info("compositor_kuwahara_classic_convolution_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_classic_convolution_shared)
|
||||||
.push_constant(Type::INT, "size")
|
PUSH_CONSTANT(INT, size)
|
||||||
.define("CONSTANT_SIZE")
|
DEFINE("CONSTANT_SIZE")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_convolution_variable_size)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_convolution_variable_size)
|
||||||
.additional_info("compositor_kuwahara_classic_convolution_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_classic_convolution_shared)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "size_tx")
|
SAMPLER(1, FLOAT_2D, size_tx)
|
||||||
.define("VARIABLE_SIZE")
|
DEFINE("VARIABLE_SIZE")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_summed_area_table_shared)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_summed_area_table_shared)
|
||||||
.additional_info("compositor_kuwahara_classic_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_classic_shared)
|
||||||
.define("SUMMED_AREA_TABLE")
|
DEFINE("SUMMED_AREA_TABLE")
|
||||||
.sampler(0, ImageType::FLOAT_2D, "table_tx")
|
SAMPLER(0, FLOAT_2D, table_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "squared_table_tx");
|
SAMPLER(1, FLOAT_2D, squared_table_tx)
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_summed_area_table_constant_size)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_summed_area_table_constant_size)
|
||||||
.additional_info("compositor_kuwahara_classic_summed_area_table_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_classic_summed_area_table_shared)
|
||||||
.push_constant(Type::INT, "size")
|
PUSH_CONSTANT(INT, size)
|
||||||
.define("CONSTANT_SIZE")
|
DEFINE("CONSTANT_SIZE")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_summed_area_table_variable_size)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_classic_summed_area_table_variable_size)
|
||||||
.additional_info("compositor_kuwahara_classic_summed_area_table_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_classic_summed_area_table_shared)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "size_tx")
|
SAMPLER(2, FLOAT_2D, size_tx)
|
||||||
.define("VARIABLE_SIZE")
|
DEFINE("VARIABLE_SIZE")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_compute_structure_tensor)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_compute_structure_tensor)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "structure_tensor_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, structure_tensor_img)
|
||||||
.compute_source("compositor_kuwahara_anisotropic_compute_structure_tensor.glsl")
|
COMPUTE_SOURCE("compositor_kuwahara_anisotropic_compute_structure_tensor.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_shared)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "eccentricity")
|
PUSH_CONSTANT(FLOAT, eccentricity)
|
||||||
.push_constant(Type::FLOAT, "sharpness")
|
PUSH_CONSTANT(FLOAT, sharpness)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "structure_tensor_tx")
|
SAMPLER(1, FLOAT_2D, structure_tensor_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_kuwahara_anisotropic.glsl");
|
COMPUTE_SOURCE("compositor_kuwahara_anisotropic.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_constant_size)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_constant_size)
|
||||||
.additional_info("compositor_kuwahara_anisotropic_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_anisotropic_shared)
|
||||||
.define("CONSTANT_SIZE")
|
DEFINE("CONSTANT_SIZE")
|
||||||
.push_constant(Type::FLOAT, "size")
|
PUSH_CONSTANT(FLOAT, size)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_variable_size)
|
GPU_SHADER_CREATE_INFO(compositor_kuwahara_anisotropic_variable_size)
|
||||||
.additional_info("compositor_kuwahara_anisotropic_shared")
|
ADDITIONAL_INFO(compositor_kuwahara_anisotropic_shared)
|
||||||
.define("VARIABLE_SIZE")
|
DEFINE("VARIABLE_SIZE")
|
||||||
.sampler(2, ImageType::FLOAT_2D, "size_tx")
|
SAMPLER(2, FLOAT_2D, size_tx)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,18 +5,21 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_map_uv_shared)
|
GPU_SHADER_CREATE_INFO(compositor_map_uv_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "uv_tx")
|
SAMPLER(1, FLOAT_2D, uv_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img");
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_map_uv_anisotropic)
|
GPU_SHADER_CREATE_INFO(compositor_map_uv_anisotropic)
|
||||||
.additional_info("compositor_map_uv_shared")
|
ADDITIONAL_INFO(compositor_map_uv_shared)
|
||||||
.push_constant(Type::FLOAT, "gradient_attenuation_factor")
|
PUSH_CONSTANT(FLOAT, gradient_attenuation_factor)
|
||||||
.compute_source("compositor_map_uv_anisotropic.glsl")
|
COMPUTE_SOURCE("compositor_map_uv_anisotropic.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_map_uv_nearest_neighbour)
|
GPU_SHADER_CREATE_INFO(compositor_map_uv_nearest_neighbour)
|
||||||
.additional_info("compositor_map_uv_shared")
|
ADDITIONAL_INFO(compositor_map_uv_shared)
|
||||||
.compute_source("compositor_map_uv_nearest_neighbour.glsl")
|
COMPUTE_SOURCE("compositor_map_uv_nearest_neighbour.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,17 +5,20 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_blur_shared)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_blur_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "blurred_input_img")
|
IMAGE(0, GPU_R16F, READ_WRITE, FLOAT_2D, blurred_input_img)
|
||||||
.compute_source("compositor_morphological_blur.glsl");
|
COMPUTE_SOURCE("compositor_morphological_blur.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_blur_dilate)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_blur_dilate)
|
||||||
.additional_info("compositor_morphological_blur_shared")
|
ADDITIONAL_INFO(compositor_morphological_blur_shared)
|
||||||
.define("OPERATOR(x, y)", "max(x, y)")
|
DEFINE_VALUE("OPERATOR(x, y)", "max(x, y)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_blur_erode)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_blur_erode)
|
||||||
.additional_info("compositor_morphological_blur_shared")
|
ADDITIONAL_INFO(compositor_morphological_blur_shared)
|
||||||
.define("OPERATOR(x, y)", "min(x, y)")
|
DEFINE_VALUE("OPERATOR(x, y)", "min(x, y)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,19 +5,22 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_feather_shared)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_feather_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_1D, "weights_tx")
|
SAMPLER(1, FLOAT_1D, weights_tx)
|
||||||
.sampler(2, ImageType::FLOAT_1D, "falloffs_tx")
|
SAMPLER(2, FLOAT_1D, falloffs_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_morphological_distance_feather.glsl");
|
COMPUTE_SOURCE("compositor_morphological_distance_feather.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_feather_dilate)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_feather_dilate)
|
||||||
.additional_info("compositor_morphological_distance_feather_shared")
|
ADDITIONAL_INFO(compositor_morphological_distance_feather_shared)
|
||||||
.define("FUNCTION(x)", "x")
|
DEFINE_VALUE("FUNCTION(x)", "x")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_feather_erode)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_feather_erode)
|
||||||
.additional_info("compositor_morphological_distance_feather_shared")
|
ADDITIONAL_INFO(compositor_morphological_distance_feather_shared)
|
||||||
.define("FUNCTION(x)", "1.0 - x")
|
DEFINE_VALUE("FUNCTION(x)", "1.0 - x")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,20 +5,23 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_shared)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "radius")
|
PUSH_CONSTANT(INT, radius)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_morphological_distance.glsl");
|
COMPUTE_SOURCE("compositor_morphological_distance.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_dilate)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_dilate)
|
||||||
.additional_info("compositor_morphological_distance_shared")
|
ADDITIONAL_INFO(compositor_morphological_distance_shared)
|
||||||
.define("OPERATOR(a, b)", "max(a, b)")
|
DEFINE_VALUE("OPERATOR(a, b)", "max(a, b)")
|
||||||
.define("LIMIT", "FLT_MIN")
|
DEFINE_VALUE("LIMIT", "FLT_MIN")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_erode)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_erode)
|
||||||
.additional_info("compositor_morphological_distance_shared")
|
ADDITIONAL_INFO(compositor_morphological_distance_shared)
|
||||||
.define("OPERATOR(a, b)", "min(a, b)")
|
DEFINE_VALUE("OPERATOR(a, b)", "min(a, b)")
|
||||||
.define("LIMIT", "FLT_MAX")
|
DEFINE_VALUE("LIMIT", "FLT_MAX")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_threshold)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_distance_threshold)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "radius")
|
PUSH_CONSTANT(INT, radius)
|
||||||
.push_constant(Type::INT, "distance")
|
PUSH_CONSTANT(INT, distance)
|
||||||
.push_constant(Type::FLOAT, "inset")
|
PUSH_CONSTANT(FLOAT, inset)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_morphological_distance_threshold.glsl")
|
COMPUTE_SOURCE("compositor_morphological_distance_threshold.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,20 +5,23 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_step_shared)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_step_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "radius")
|
PUSH_CONSTANT(INT, radius)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_morphological_step.glsl");
|
COMPUTE_SOURCE("compositor_morphological_step.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_step_dilate)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_step_dilate)
|
||||||
.additional_info("compositor_morphological_step_shared")
|
ADDITIONAL_INFO(compositor_morphological_step_shared)
|
||||||
.define("OPERATOR(a, b)", "max(a, b)")
|
DEFINE_VALUE("OPERATOR(a, b)", "max(a, b)")
|
||||||
.define("LIMIT", "FLT_MIN")
|
DEFINE_VALUE("LIMIT", "FLT_MIN")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_morphological_step_erode)
|
GPU_SHADER_CREATE_INFO(compositor_morphological_step_erode)
|
||||||
.additional_info("compositor_morphological_step_shared")
|
ADDITIONAL_INFO(compositor_morphological_step_shared)
|
||||||
.define("OPERATOR(a, b)", "min(a, b)")
|
DEFINE_VALUE("OPERATOR(a, b)", "min(a, b)")
|
||||||
.define("LIMIT", "FLT_MAX")
|
DEFINE_VALUE("LIMIT", "FLT_MAX")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,22 +5,24 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_motion_blur_max_velocity_dilate)
|
GPU_SHADER_CREATE_INFO(compositor_motion_blur_max_velocity_dilate)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "shutter_speed")
|
PUSH_CONSTANT(FLOAT, shutter_speed)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.storage_buf(0, Qualifier::READ_WRITE, "uint", "tile_indirection_buf[]")
|
STORAGE_BUF(0, READ_WRITE, uint, tile_indirection_buf[])
|
||||||
.compute_source("compositor_motion_blur_max_velocity_dilate.glsl")
|
COMPUTE_SOURCE("compositor_motion_blur_max_velocity_dilate.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_motion_blur)
|
GPU_SHADER_CREATE_INFO(compositor_motion_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "samples_count")
|
PUSH_CONSTANT(INT, samples_count)
|
||||||
.push_constant(Type::FLOAT, "shutter_speed")
|
PUSH_CONSTANT(FLOAT, shutter_speed)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "depth_tx")
|
SAMPLER(1, FLOAT_2D, depth_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "velocity_tx")
|
SAMPLER(2, FLOAT_2D, velocity_tx)
|
||||||
.sampler(3, ImageType::FLOAT_2D, "max_velocity_tx")
|
SAMPLER(3, FLOAT_2D, max_velocity_tx)
|
||||||
.storage_buf(0, Qualifier::READ, "uint", "tile_indirection_buf[]")
|
STORAGE_BUF(0, READ, uint, tile_indirection_buf[])
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_motion_blur.glsl")
|
COMPUTE_SOURCE("compositor_motion_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_movie_distortion)
|
GPU_SHADER_CREATE_INFO(compositor_movie_distortion)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "distortion_grid_tx")
|
SAMPLER(1, FLOAT_2D, distortion_grid_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_movie_distortion.glsl")
|
COMPUTE_SOURCE("compositor_movie_distortion.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_normalize)
|
GPU_SHADER_CREATE_INFO(compositor_normalize)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "minimum")
|
PUSH_CONSTANT(FLOAT, minimum)
|
||||||
.push_constant(Type::FLOAT, "scale")
|
PUSH_CONSTANT(FLOAT, scale)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_normalize.glsl")
|
COMPUTE_SOURCE("compositor_normalize.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,189 +5,210 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_parallel_reduction_shared)
|
GPU_SHADER_CREATE_INFO(compositor_parallel_reduction_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "is_initial_reduction")
|
PUSH_CONSTANT(BOOL, is_initial_reduction)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.compute_source("compositor_parallel_reduction.glsl");
|
COMPUTE_SOURCE("compositor_parallel_reduction.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Sum Reductions.
|
* Sum Reductions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_shared)
|
GPU_SHADER_CREATE_INFO(compositor_sum_shared)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.define("REDUCE(lhs, rhs)", "lhs + rhs");
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "lhs + rhs")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_float_shared)
|
GPU_SHADER_CREATE_INFO(compositor_sum_float_shared)
|
||||||
.additional_info("compositor_sum_shared")
|
ADDITIONAL_INFO(compositor_sum_shared)
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "0.0")
|
DEFINE_VALUE("IDENTITY", "0.0")
|
||||||
.define("LOAD(value)", "value.x");
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_red)
|
GPU_SHADER_CREATE_INFO(compositor_sum_red)
|
||||||
.additional_info("compositor_sum_float_shared")
|
ADDITIONAL_INFO(compositor_sum_float_shared)
|
||||||
.define("INITIALIZE(value)", "value.r")
|
DEFINE_VALUE("INITIALIZE(value)", "value.r")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_green)
|
GPU_SHADER_CREATE_INFO(compositor_sum_green)
|
||||||
.additional_info("compositor_sum_float_shared")
|
ADDITIONAL_INFO(compositor_sum_float_shared)
|
||||||
.define("INITIALIZE(value)", "value.g")
|
DEFINE_VALUE("INITIALIZE(value)", "value.g")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_blue)
|
GPU_SHADER_CREATE_INFO(compositor_sum_blue)
|
||||||
.additional_info("compositor_sum_float_shared")
|
ADDITIONAL_INFO(compositor_sum_float_shared)
|
||||||
.define("INITIALIZE(value)", "value.b")
|
DEFINE_VALUE("INITIALIZE(value)", "value.b")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_luminance)
|
GPU_SHADER_CREATE_INFO(compositor_sum_luminance)
|
||||||
.additional_info("compositor_sum_float_shared")
|
ADDITIONAL_INFO(compositor_sum_float_shared)
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.define("INITIALIZE(value)", "dot(value.rgb, luminance_coefficients)")
|
DEFINE_VALUE("INITIALIZE(value)", "dot(value.rgb, luminance_coefficients)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_log_luminance)
|
GPU_SHADER_CREATE_INFO(compositor_sum_log_luminance)
|
||||||
.additional_info("compositor_sum_float_shared")
|
ADDITIONAL_INFO(compositor_sum_float_shared)
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.define("INITIALIZE(value)", "log(max(dot(value.rgb, luminance_coefficients), 1e-5))")
|
DEFINE_VALUE("INITIALIZE(value)", "log(max(dot(value.rgb, luminance_coefficients), 1e-5))")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_color)
|
GPU_SHADER_CREATE_INFO(compositor_sum_color)
|
||||||
.additional_info("compositor_sum_shared")
|
ADDITIONAL_INFO(compositor_sum_shared)
|
||||||
.image(0, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA32F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("TYPE", "vec4")
|
DEFINE_VALUE("TYPE", "vec4")
|
||||||
.define("IDENTITY", "vec4(0.0)")
|
DEFINE_VALUE("IDENTITY", "vec4(0.0)")
|
||||||
.define("INITIALIZE(value)", "value")
|
DEFINE_VALUE("INITIALIZE(value)", "value")
|
||||||
.define("LOAD(value)", "value")
|
DEFINE_VALUE("LOAD(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Sum Of Squared Difference Reductions.
|
* Sum Of Squared Difference Reductions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_squared_difference_float_shared)
|
GPU_SHADER_CREATE_INFO(compositor_sum_squared_difference_float_shared)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.push_constant(Type::FLOAT, "subtrahend")
|
PUSH_CONSTANT(FLOAT, subtrahend)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "0.0")
|
DEFINE_VALUE("IDENTITY", "0.0")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "lhs + rhs");
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "lhs + rhs")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_red_squared_difference)
|
GPU_SHADER_CREATE_INFO(compositor_sum_red_squared_difference)
|
||||||
.additional_info("compositor_sum_squared_difference_float_shared")
|
ADDITIONAL_INFO(compositor_sum_squared_difference_float_shared)
|
||||||
.define("INITIALIZE(value)", "pow(value.r - subtrahend, 2.0)")
|
DEFINE_VALUE("INITIALIZE(value)", "pow(value.r - subtrahend, 2.0)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_green_squared_difference)
|
GPU_SHADER_CREATE_INFO(compositor_sum_green_squared_difference)
|
||||||
.additional_info("compositor_sum_squared_difference_float_shared")
|
ADDITIONAL_INFO(compositor_sum_squared_difference_float_shared)
|
||||||
.define("INITIALIZE(value)", "pow(value.g - subtrahend, 2.0)")
|
DEFINE_VALUE("INITIALIZE(value)", "pow(value.g - subtrahend, 2.0)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_blue_squared_difference)
|
GPU_SHADER_CREATE_INFO(compositor_sum_blue_squared_difference)
|
||||||
.additional_info("compositor_sum_squared_difference_float_shared")
|
ADDITIONAL_INFO(compositor_sum_squared_difference_float_shared)
|
||||||
.define("INITIALIZE(value)", "pow(value.b - subtrahend, 2.0)")
|
DEFINE_VALUE("INITIALIZE(value)", "pow(value.b - subtrahend, 2.0)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sum_luminance_squared_difference)
|
GPU_SHADER_CREATE_INFO(compositor_sum_luminance_squared_difference)
|
||||||
.additional_info("compositor_sum_squared_difference_float_shared")
|
ADDITIONAL_INFO(compositor_sum_squared_difference_float_shared)
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.define("INITIALIZE(value)", "pow(dot(value.rgb, luminance_coefficients) - subtrahend, 2.0)")
|
DEFINE_VALUE("INITIALIZE(value)", "pow(dot(value.rgb, luminance_coefficients) - subtrahend, 2.0)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Maximum Reductions.
|
* Maximum Reductions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_maximum_luminance)
|
GPU_SHADER_CREATE_INFO(compositor_maximum_luminance)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.typedef_source("common_math_lib.glsl")
|
TYPEDEF_SOURCE("common_math_lib.glsl")
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "FLT_MIN")
|
DEFINE_VALUE("IDENTITY", "FLT_MIN")
|
||||||
.define("INITIALIZE(value)", "dot(value.rgb, luminance_coefficients)")
|
DEFINE_VALUE("INITIALIZE(value)", "dot(value.rgb, luminance_coefficients)")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "max(lhs, rhs)")
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "max(lhs, rhs)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_maximum_float)
|
GPU_SHADER_CREATE_INFO(compositor_maximum_float)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.typedef_source("common_math_lib.glsl")
|
TYPEDEF_SOURCE("common_math_lib.glsl")
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "FLT_MIN")
|
DEFINE_VALUE("IDENTITY", "FLT_MIN")
|
||||||
.define("INITIALIZE(value)", "value.x")
|
DEFINE_VALUE("INITIALIZE(value)", "value.x")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "max(rhs, lhs)")
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "max(rhs, lhs)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_maximum_float_in_range)
|
GPU_SHADER_CREATE_INFO(compositor_maximum_float_in_range)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.push_constant(Type::FLOAT, "lower_bound")
|
PUSH_CONSTANT(FLOAT, lower_bound)
|
||||||
.push_constant(Type::FLOAT, "upper_bound")
|
PUSH_CONSTANT(FLOAT, upper_bound)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "lower_bound")
|
DEFINE_VALUE("IDENTITY", "lower_bound")
|
||||||
.define("INITIALIZE(v)", "((v.x <= upper_bound) && (v.x >= lower_bound)) ? v.x : lower_bound")
|
DEFINE_VALUE("INITIALIZE(v)", "((v.x <= upper_bound) && (v.x >= lower_bound)) ? v.x : lower_bound")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "((rhs > lhs) && (rhs <= upper_bound)) ? rhs : lhs")
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "((rhs > lhs) && (rhs <= upper_bound)) ? rhs : lhs")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Minimum Reductions.
|
* Minimum Reductions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_minimum_luminance)
|
GPU_SHADER_CREATE_INFO(compositor_minimum_luminance)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.typedef_source("common_math_lib.glsl")
|
TYPEDEF_SOURCE("common_math_lib.glsl")
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "FLT_MAX")
|
DEFINE_VALUE("IDENTITY", "FLT_MAX")
|
||||||
.define("INITIALIZE(value)", "dot(value.rgb, luminance_coefficients)")
|
DEFINE_VALUE("INITIALIZE(value)", "dot(value.rgb, luminance_coefficients)")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "min(lhs, rhs)")
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "min(lhs, rhs)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_minimum_float)
|
GPU_SHADER_CREATE_INFO(compositor_minimum_float)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.typedef_source("common_math_lib.glsl")
|
TYPEDEF_SOURCE("common_math_lib.glsl")
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "FLT_MAX")
|
DEFINE_VALUE("IDENTITY", "FLT_MAX")
|
||||||
.define("INITIALIZE(value)", "value.x")
|
DEFINE_VALUE("INITIALIZE(value)", "value.x")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "min(rhs, lhs)")
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "min(rhs, lhs)")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_minimum_float_in_range)
|
GPU_SHADER_CREATE_INFO(compositor_minimum_float_in_range)
|
||||||
.additional_info("compositor_parallel_reduction_shared")
|
ADDITIONAL_INFO(compositor_parallel_reduction_shared)
|
||||||
.image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R32F, WRITE, FLOAT_2D, output_img)
|
||||||
.push_constant(Type::FLOAT, "lower_bound")
|
PUSH_CONSTANT(FLOAT, lower_bound)
|
||||||
.push_constant(Type::FLOAT, "upper_bound")
|
PUSH_CONSTANT(FLOAT, upper_bound)
|
||||||
.define("TYPE", "float")
|
DEFINE_VALUE("TYPE", "float")
|
||||||
.define("IDENTITY", "upper_bound")
|
DEFINE_VALUE("IDENTITY", "upper_bound")
|
||||||
.define("INITIALIZE(v)", "((v.x <= upper_bound) && (v.x >= lower_bound)) ? v.x : upper_bound")
|
DEFINE_VALUE("INITIALIZE(v)", "((v.x <= upper_bound) && (v.x >= lower_bound)) ? v.x : upper_bound")
|
||||||
.define("LOAD(value)", "value.x")
|
DEFINE_VALUE("LOAD(value)", "value.x")
|
||||||
.define("REDUCE(lhs, rhs)", "((rhs < lhs) && (rhs >= lower_bound)) ? rhs : lhs")
|
DEFINE_VALUE("REDUCE(lhs, rhs)", "((rhs < lhs) && (rhs >= lower_bound)) ? rhs : lhs")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Velocity Reductions.
|
* Velocity Reductions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_max_velocity)
|
GPU_SHADER_CREATE_INFO(compositor_max_velocity)
|
||||||
.local_group_size(32, 32)
|
LOCAL_GROUP_SIZE(32, 32)
|
||||||
.push_constant(Type::BOOL, "is_initial_reduction")
|
PUSH_CONSTANT(BOOL, is_initial_reduction)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("TYPE", "vec4")
|
DEFINE_VALUE("TYPE", "vec4")
|
||||||
.define("IDENTITY", "vec4(0.0)")
|
DEFINE_VALUE("IDENTITY", "vec4(0.0)")
|
||||||
.define("INITIALIZE(value)", "value")
|
DEFINE_VALUE("INITIALIZE(value)", "value")
|
||||||
.define("LOAD(value)", "value")
|
DEFINE_VALUE("LOAD(value)", "value")
|
||||||
.define("REDUCE(lhs, rhs)",
|
DEFINE_VALUE("REDUCE(lhs, rhs)",
|
||||||
"vec4(dot(lhs.xy, lhs.xy) > dot(rhs.xy, rhs.xy) ? lhs.xy : rhs.xy,"
|
"vec4(dot(lhs.xy, lhs.xy) > dot(rhs.xy, rhs.xy) ? lhs.xy : rhs.xy,"
|
||||||
" dot(lhs.zw, lhs.zw) > dot(rhs.zw, rhs.zw) ? lhs.zw : rhs.zw)")
|
" dot(lhs.zw, lhs.zw) > dot(rhs.zw, rhs.zw) ? lhs.zw : rhs.zw)")
|
||||||
.compute_source("compositor_parallel_reduction.glsl")
|
COMPUTE_SOURCE("compositor_parallel_reduction.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_pixelate)
|
GPU_SHADER_CREATE_INFO(compositor_pixelate)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "pixel_size")
|
PUSH_CONSTANT(INT, pixel_size)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_pixelate.glsl")
|
COMPUTE_SOURCE("compositor_pixelate.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,35 +5,39 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_plane_deform_mask)
|
GPU_SHADER_CREATE_INFO(compositor_plane_deform_mask)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::MAT4, "homography_matrix")
|
PUSH_CONSTANT(MAT4, homography_matrix)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "mask_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, mask_img)
|
||||||
.compute_source("compositor_plane_deform_mask.glsl")
|
COMPUTE_SOURCE("compositor_plane_deform_mask.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_plane_deform)
|
GPU_SHADER_CREATE_INFO(compositor_plane_deform)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::MAT4, "homography_matrix")
|
PUSH_CONSTANT(MAT4, homography_matrix)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "mask_tx")
|
SAMPLER(1, FLOAT_2D, mask_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_plane_deform.glsl")
|
COMPUTE_SOURCE("compositor_plane_deform.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_plane_deform_motion_blur_mask)
|
GPU_SHADER_CREATE_INFO(compositor_plane_deform_motion_blur_mask)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "number_of_motion_blur_samples")
|
PUSH_CONSTANT(INT, number_of_motion_blur_samples)
|
||||||
.uniform_buf(0, "mat4", "homography_matrices[64]")
|
UNIFORM_BUF(0, mat4, homography_matrices[64])
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "mask_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, mask_img)
|
||||||
.compute_source("compositor_plane_deform_motion_blur_mask.glsl")
|
COMPUTE_SOURCE("compositor_plane_deform_motion_blur_mask.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_plane_deform_motion_blur)
|
GPU_SHADER_CREATE_INFO(compositor_plane_deform_motion_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::INT, "number_of_motion_blur_samples")
|
PUSH_CONSTANT(INT, number_of_motion_blur_samples)
|
||||||
.uniform_buf(0, "mat4", "homography_matrices[64]")
|
UNIFORM_BUF(0, mat4, homography_matrices[64])
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "mask_tx")
|
SAMPLER(1, FLOAT_2D, mask_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_plane_deform_motion_blur.glsl")
|
COMPUTE_SOURCE("compositor_plane_deform_motion_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_premultiply_alpha)
|
GPU_SHADER_CREATE_INFO(compositor_premultiply_alpha)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_premultiply_alpha.glsl")
|
COMPUTE_SOURCE("compositor_premultiply_alpha.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,9 +5,10 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_projector_lens_distortion)
|
GPU_SHADER_CREATE_INFO(compositor_projector_lens_distortion)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "dispersion")
|
PUSH_CONSTANT(FLOAT, dispersion)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_projector_lens_distortion.glsl")
|
COMPUTE_SOURCE("compositor_projector_lens_distortion.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,31 +5,36 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_read_input_shared)
|
GPU_SHADER_CREATE_INFO(compositor_read_input_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::IVEC2, "lower_bound")
|
PUSH_CONSTANT(IVEC2, lower_bound)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.compute_source("compositor_read_input.glsl");
|
COMPUTE_SOURCE("compositor_read_input.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_read_input_float)
|
GPU_SHADER_CREATE_INFO(compositor_read_input_float)
|
||||||
.additional_info("compositor_read_input_shared")
|
ADDITIONAL_INFO(compositor_read_input_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("READ_EXPRESSION(input_color)", "vec4(input_color.r, vec3(0.0))")
|
DEFINE_VALUE("READ_EXPRESSION(input_color)", "vec4(input_color.r, vec3(0.0))")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_read_input_vector)
|
GPU_SHADER_CREATE_INFO(compositor_read_input_vector)
|
||||||
.additional_info("compositor_read_input_shared")
|
ADDITIONAL_INFO(compositor_read_input_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("READ_EXPRESSION(input_color)", "input_color")
|
DEFINE_VALUE("READ_EXPRESSION(input_color)", "input_color")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_read_input_color)
|
GPU_SHADER_CREATE_INFO(compositor_read_input_color)
|
||||||
.additional_info("compositor_read_input_shared")
|
ADDITIONAL_INFO(compositor_read_input_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("READ_EXPRESSION(input_color)", "input_color")
|
DEFINE_VALUE("READ_EXPRESSION(input_color)", "input_color")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_read_input_alpha)
|
GPU_SHADER_CREATE_INFO(compositor_read_input_alpha)
|
||||||
.additional_info("compositor_read_input_shared")
|
ADDITIONAL_INFO(compositor_read_input_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.define("READ_EXPRESSION(input_color)", "vec4(input_color.a, vec3(0.0))")
|
DEFINE_VALUE("READ_EXPRESSION(input_color)", "vec4(input_color.a, vec3(0.0))")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,45 +5,54 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_shared)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::MAT4, "inverse_transformation")
|
PUSH_CONSTANT(MAT4, inverse_transformation)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.compute_source("compositor_realize_on_domain.glsl");
|
COMPUTE_SOURCE("compositor_realize_on_domain.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_standard_shared)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_standard_shared)
|
||||||
.additional_info("compositor_realize_on_domain_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_shared)
|
||||||
.define("SAMPLER_FUNCTION", "texture");
|
DEFINE_VALUE("SAMPLER_FUNCTION", "texture")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_shared)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_shared)
|
||||||
.additional_info("compositor_realize_on_domain_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_shared)
|
||||||
.define("SAMPLER_FUNCTION", "texture_bicubic");
|
DEFINE_VALUE("SAMPLER_FUNCTION", "texture_bicubic")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_color)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_color)
|
||||||
.additional_info("compositor_realize_on_domain_standard_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_standard_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "domain_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, domain_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_vector)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_vector)
|
||||||
.additional_info("compositor_realize_on_domain_standard_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_standard_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "domain_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, domain_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_float)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_float)
|
||||||
.additional_info("compositor_realize_on_domain_standard_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_standard_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "domain_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, domain_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_color)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_color)
|
||||||
.additional_info("compositor_realize_on_domain_bicubic_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_bicubic_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "domain_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, domain_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_vector)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_vector)
|
||||||
.additional_info("compositor_realize_on_domain_bicubic_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_bicubic_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "domain_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, domain_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_float)
|
GPU_SHADER_CREATE_INFO(compositor_realize_on_domain_bicubic_float)
|
||||||
.additional_info("compositor_realize_on_domain_bicubic_shared")
|
ADDITIONAL_INFO(compositor_realize_on_domain_bicubic_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "domain_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, domain_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_scale_variable)
|
GPU_SHADER_CREATE_INFO(compositor_scale_variable)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "x_scale_tx")
|
SAMPLER(1, FLOAT_2D, x_scale_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "y_scale_tx")
|
SAMPLER(2, FLOAT_2D, y_scale_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_scale_variable.glsl")
|
COMPUTE_SOURCE("compositor_scale_variable.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,18 +5,21 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_screen_lens_distortion_shared)
|
GPU_SHADER_CREATE_INFO(compositor_screen_lens_distortion_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::VEC3, "chromatic_distortion")
|
PUSH_CONSTANT(VEC3, chromatic_distortion)
|
||||||
.push_constant(Type::FLOAT, "scale")
|
PUSH_CONSTANT(FLOAT, scale)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_screen_lens_distortion.glsl");
|
COMPUTE_SOURCE("compositor_screen_lens_distortion.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_screen_lens_distortion)
|
GPU_SHADER_CREATE_INFO(compositor_screen_lens_distortion)
|
||||||
.additional_info("compositor_screen_lens_distortion_shared")
|
ADDITIONAL_INFO(compositor_screen_lens_distortion_shared)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_screen_lens_distortion_jitter)
|
GPU_SHADER_CREATE_INFO(compositor_screen_lens_distortion_jitter)
|
||||||
.additional_info("compositor_screen_lens_distortion_shared")
|
ADDITIONAL_INFO(compositor_screen_lens_distortion_shared)
|
||||||
.define("JITTER")
|
DEFINE("JITTER")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,55 +5,61 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_smaa_edge_detection)
|
GPU_SHADER_CREATE_INFO(compositor_smaa_edge_detection)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.define("SMAA_GLSL_3")
|
DEFINE("SMAA_GLSL_3")
|
||||||
.define("SMAA_RT_METRICS",
|
DEFINE_VALUE("SMAA_RT_METRICS",
|
||||||
"vec4(1.0 / vec2(textureSize(input_tx, 0)), vec2(textureSize(input_tx, 0)))")
|
"vec4(1.0 / vec2(textureSize(input_tx, 0)), vec2(textureSize(input_tx, 0)))")
|
||||||
.define("SMAA_LUMA_WEIGHT", "vec4(luminance_coefficients, 0.0)")
|
DEFINE_VALUE("SMAA_LUMA_WEIGHT", "vec4(luminance_coefficients, 0.0)")
|
||||||
.define("SMAA_THRESHOLD", "smaa_threshold")
|
DEFINE_VALUE("SMAA_THRESHOLD", "smaa_threshold")
|
||||||
.define("SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR", "smaa_local_contrast_adaptation_factor")
|
DEFINE_VALUE("SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR", "smaa_local_contrast_adaptation_factor")
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.push_constant(Type::FLOAT, "smaa_threshold")
|
PUSH_CONSTANT(FLOAT, smaa_threshold)
|
||||||
.push_constant(Type::FLOAT, "smaa_local_contrast_adaptation_factor")
|
PUSH_CONSTANT(FLOAT, smaa_local_contrast_adaptation_factor)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "edges_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, edges_img)
|
||||||
.compute_source("compositor_smaa_edge_detection.glsl")
|
COMPUTE_SOURCE("compositor_smaa_edge_detection.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_smaa_blending_weight_calculation)
|
GPU_SHADER_CREATE_INFO(compositor_smaa_blending_weight_calculation)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.define("SMAA_GLSL_3")
|
DEFINE("SMAA_GLSL_3")
|
||||||
.define("SMAA_RT_METRICS",
|
DEFINE_VALUE("SMAA_RT_METRICS",
|
||||||
"vec4(1.0 / vec2(textureSize(edges_tx, 0)), vec2(textureSize(edges_tx, 0)))")
|
"vec4(1.0 / vec2(textureSize(edges_tx, 0)), vec2(textureSize(edges_tx, 0)))")
|
||||||
.define("SMAA_CORNER_ROUNDING", "smaa_corner_rounding")
|
DEFINE_VALUE("SMAA_CORNER_ROUNDING", "smaa_corner_rounding")
|
||||||
.push_constant(Type::INT, "smaa_corner_rounding")
|
PUSH_CONSTANT(INT, smaa_corner_rounding)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "edges_tx")
|
SAMPLER(0, FLOAT_2D, edges_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "area_tx")
|
SAMPLER(1, FLOAT_2D, area_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "search_tx")
|
SAMPLER(2, FLOAT_2D, search_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "weights_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, weights_img)
|
||||||
.compute_source("compositor_smaa_blending_weight_calculation.glsl")
|
COMPUTE_SOURCE("compositor_smaa_blending_weight_calculation.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_shared)
|
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.define("SMAA_GLSL_3")
|
DEFINE("SMAA_GLSL_3")
|
||||||
.define("SMAA_RT_METRICS",
|
DEFINE_VALUE("SMAA_RT_METRICS",
|
||||||
"vec4(1.0 / vec2(textureSize(input_tx, 0)), vec2(textureSize(input_tx, 0)))")
|
"vec4(1.0 / vec2(textureSize(input_tx, 0)), vec2(textureSize(input_tx, 0)))")
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "weights_tx")
|
SAMPLER(1, FLOAT_2D, weights_tx)
|
||||||
.compute_source("compositor_smaa_neighborhood_blending.glsl");
|
COMPUTE_SOURCE("compositor_smaa_neighborhood_blending.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float4)
|
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float4)
|
||||||
.additional_info("compositor_smaa_neighborhood_blending_shared")
|
ADDITIONAL_INFO(compositor_smaa_neighborhood_blending_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float2)
|
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float2)
|
||||||
.additional_info("compositor_smaa_neighborhood_blending_shared")
|
ADDITIONAL_INFO(compositor_smaa_neighborhood_blending_shared)
|
||||||
.image(0, GPU_RG16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RG16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float)
|
GPU_SHADER_CREATE_INFO(compositor_smaa_neighborhood_blending_float)
|
||||||
.additional_info("compositor_smaa_neighborhood_blending_shared")
|
ADDITIONAL_INFO(compositor_smaa_neighborhood_blending_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,19 +5,22 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_split_shared)
|
GPU_SHADER_CREATE_INFO(compositor_split_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "split_ratio")
|
PUSH_CONSTANT(FLOAT, split_ratio)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "first_image_tx")
|
SAMPLER(0, FLOAT_2D, first_image_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "second_image_tx")
|
SAMPLER(1, FLOAT_2D, second_image_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_split.glsl");
|
COMPUTE_SOURCE("compositor_split.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_split_horizontal)
|
GPU_SHADER_CREATE_INFO(compositor_split_horizontal)
|
||||||
.additional_info("compositor_split_shared")
|
ADDITIONAL_INFO(compositor_split_shared)
|
||||||
.define("SPLIT_HORIZONTAL")
|
DEFINE("SPLIT_HORIZONTAL")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_split_vertical)
|
GPU_SHADER_CREATE_INFO(compositor_split_vertical)
|
||||||
.additional_info("compositor_split_shared")
|
ADDITIONAL_INFO(compositor_split_shared)
|
||||||
.define("SPLIT_VERTICAL")
|
DEFINE("SPLIT_VERTICAL")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,52 +5,60 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_incomplete_prologues_shared)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_incomplete_prologues_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "incomplete_x_prologues_img")
|
IMAGE(0, GPU_RGBA32F, WRITE, FLOAT_2D, incomplete_x_prologues_img)
|
||||||
.image(1, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "incomplete_y_prologues_img")
|
IMAGE(1, GPU_RGBA32F, WRITE, FLOAT_2D, incomplete_y_prologues_img)
|
||||||
.compute_source("compositor_summed_area_table_compute_incomplete_prologues.glsl");
|
COMPUTE_SOURCE("compositor_summed_area_table_compute_incomplete_prologues.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_incomplete_prologues_identity)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_incomplete_prologues_identity)
|
||||||
.additional_info("compositor_summed_area_table_compute_incomplete_prologues_shared")
|
ADDITIONAL_INFO(compositor_summed_area_table_compute_incomplete_prologues_shared)
|
||||||
.define("OPERATION(value)", "value")
|
DEFINE_VALUE("OPERATION(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_incomplete_prologues_square)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_incomplete_prologues_square)
|
||||||
.additional_info("compositor_summed_area_table_compute_incomplete_prologues_shared")
|
ADDITIONAL_INFO(compositor_summed_area_table_compute_incomplete_prologues_shared)
|
||||||
.define("OPERATION(value)", "value * value")
|
DEFINE_VALUE("OPERATION(value)", "value * value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_x_prologues)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_x_prologues)
|
||||||
.local_group_size(16)
|
LOCAL_GROUP_SIZE(16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "incomplete_x_prologues_tx")
|
SAMPLER(0, FLOAT_2D, incomplete_x_prologues_tx)
|
||||||
.image(0, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "complete_x_prologues_img")
|
IMAGE(0, GPU_RGBA32F, WRITE, FLOAT_2D, complete_x_prologues_img)
|
||||||
.image(1, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "complete_x_prologues_sum_img")
|
IMAGE(1, GPU_RGBA32F, WRITE, FLOAT_2D, complete_x_prologues_sum_img)
|
||||||
.compute_source("compositor_summed_area_table_compute_complete_x_prologues.glsl")
|
COMPUTE_SOURCE("compositor_summed_area_table_compute_complete_x_prologues.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_y_prologues)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_y_prologues)
|
||||||
.local_group_size(16)
|
LOCAL_GROUP_SIZE(16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "incomplete_y_prologues_tx")
|
SAMPLER(0, FLOAT_2D, incomplete_y_prologues_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "complete_x_prologues_sum_tx")
|
SAMPLER(1, FLOAT_2D, complete_x_prologues_sum_tx)
|
||||||
.image(0, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "complete_y_prologues_img")
|
IMAGE(0, GPU_RGBA32F, WRITE, FLOAT_2D, complete_y_prologues_img)
|
||||||
.compute_source("compositor_summed_area_table_compute_complete_y_prologues.glsl")
|
COMPUTE_SOURCE("compositor_summed_area_table_compute_complete_y_prologues.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_blocks_shared)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_blocks_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "complete_x_prologues_tx")
|
SAMPLER(1, FLOAT_2D, complete_x_prologues_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "complete_y_prologues_tx")
|
SAMPLER(2, FLOAT_2D, complete_y_prologues_tx)
|
||||||
.image(0, GPU_RGBA32F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA32F, READ_WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_summed_area_table_compute_complete_blocks.glsl");
|
COMPUTE_SOURCE("compositor_summed_area_table_compute_complete_blocks.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_blocks_identity)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_blocks_identity)
|
||||||
.additional_info("compositor_summed_area_table_compute_complete_blocks_shared")
|
ADDITIONAL_INFO(compositor_summed_area_table_compute_complete_blocks_shared)
|
||||||
.define("OPERATION(value)", "value")
|
DEFINE_VALUE("OPERATION(value)", "value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_blocks_square)
|
GPU_SHADER_CREATE_INFO(compositor_summed_area_table_compute_complete_blocks_square)
|
||||||
.additional_info("compositor_summed_area_table_compute_complete_blocks_shared")
|
ADDITIONAL_INFO(compositor_summed_area_table_compute_complete_blocks_shared)
|
||||||
.define("OPERATION(value)", "value * value")
|
DEFINE_VALUE("OPERATION(value)", "value * value")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_sun_beams)
|
GPU_SHADER_CREATE_INFO(compositor_sun_beams)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::VEC2, "source")
|
PUSH_CONSTANT(VEC2, source)
|
||||||
.push_constant(Type::INT, "max_steps")
|
PUSH_CONSTANT(INT, max_steps)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_sun_beams.glsl")
|
COMPUTE_SOURCE("compositor_sun_beams.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_blur)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_blur)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "extend_bounds")
|
PUSH_CONSTANT(BOOL, extend_bounds)
|
||||||
.push_constant(Type::BOOL, "gamma_correct")
|
PUSH_CONSTANT(BOOL, gamma_correct)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "weights_tx")
|
SAMPLER(1, FLOAT_2D, weights_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_symmetric_blur.glsl")
|
COMPUTE_SOURCE("compositor_symmetric_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,12 +5,13 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_blur_variable_size)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_blur_variable_size)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "extend_bounds")
|
PUSH_CONSTANT(BOOL, extend_bounds)
|
||||||
.push_constant(Type::BOOL, "gamma_correct")
|
PUSH_CONSTANT(BOOL, gamma_correct)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "weights_tx")
|
SAMPLER(1, FLOAT_2D, weights_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "size_tx")
|
SAMPLER(2, FLOAT_2D, size_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_symmetric_blur_variable_size.glsl")
|
COMPUTE_SOURCE("compositor_symmetric_blur_variable_size.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,25 +5,29 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_shared)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "extend_bounds")
|
PUSH_CONSTANT(BOOL, extend_bounds)
|
||||||
.push_constant(Type::BOOL, "gamma_correct_input")
|
PUSH_CONSTANT(BOOL, gamma_correct_input)
|
||||||
.push_constant(Type::BOOL, "gamma_uncorrect_output")
|
PUSH_CONSTANT(BOOL, gamma_uncorrect_output)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_1D, "weights_tx")
|
SAMPLER(1, FLOAT_1D, weights_tx)
|
||||||
.compute_source("compositor_symmetric_separable_blur.glsl");
|
COMPUTE_SOURCE("compositor_symmetric_separable_blur.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_float)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_float)
|
||||||
.additional_info("compositor_symmetric_separable_blur_shared")
|
ADDITIONAL_INFO(compositor_symmetric_separable_blur_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_float2)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_float2)
|
||||||
.additional_info("compositor_symmetric_separable_blur_shared")
|
ADDITIONAL_INFO(compositor_symmetric_separable_blur_shared)
|
||||||
.image(0, GPU_RG16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RG16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_float4)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_float4)
|
||||||
.additional_info("compositor_symmetric_separable_blur_shared")
|
ADDITIONAL_INFO(compositor_symmetric_separable_blur_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,24 +5,28 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_shared)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "is_vertical_pass")
|
PUSH_CONSTANT(BOOL, is_vertical_pass)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_1D, "weights_tx")
|
SAMPLER(1, FLOAT_1D, weights_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "radius_tx")
|
SAMPLER(2, FLOAT_2D, radius_tx)
|
||||||
.compute_source("compositor_symmetric_separable_blur_variable_size.glsl");
|
COMPUTE_SOURCE("compositor_symmetric_separable_blur_variable_size.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_float)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_float)
|
||||||
.additional_info("compositor_symmetric_separable_blur_variable_size_shared")
|
ADDITIONAL_INFO(compositor_symmetric_separable_blur_variable_size_shared)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_float2)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_float2)
|
||||||
.additional_info("compositor_symmetric_separable_blur_variable_size_shared")
|
ADDITIONAL_INFO(compositor_symmetric_separable_blur_variable_size_shared)
|
||||||
.image(0, GPU_RG16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RG16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_float4)
|
GPU_SHADER_CREATE_INFO(compositor_symmetric_separable_blur_variable_size_float4)
|
||||||
.additional_info("compositor_symmetric_separable_blur_variable_size_shared")
|
ADDITIONAL_INFO(compositor_symmetric_separable_blur_variable_size_shared)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_tone_map_photoreceptor)
|
GPU_SHADER_CREATE_INFO(compositor_tone_map_photoreceptor)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::VEC4, "global_adaptation_level")
|
PUSH_CONSTANT(VEC4, global_adaptation_level)
|
||||||
.push_constant(Type::FLOAT, "contrast")
|
PUSH_CONSTANT(FLOAT, contrast)
|
||||||
.push_constant(Type::FLOAT, "intensity")
|
PUSH_CONSTANT(FLOAT, intensity)
|
||||||
.push_constant(Type::FLOAT, "chromatic_adaptation")
|
PUSH_CONSTANT(FLOAT, chromatic_adaptation)
|
||||||
.push_constant(Type::FLOAT, "light_adaptation")
|
PUSH_CONSTANT(FLOAT, light_adaptation)
|
||||||
.push_constant(Type::VEC3, "luminance_coefficients")
|
PUSH_CONSTANT(VEC3, luminance_coefficients)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_tone_map_photoreceptor.glsl")
|
COMPUTE_SOURCE("compositor_tone_map_photoreceptor.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,11 +5,12 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_tone_map_simple)
|
GPU_SHADER_CREATE_INFO(compositor_tone_map_simple)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::FLOAT, "luminance_scale")
|
PUSH_CONSTANT(FLOAT, luminance_scale)
|
||||||
.push_constant(Type::FLOAT, "luminance_scale_blend_factor")
|
PUSH_CONSTANT(FLOAT, luminance_scale_blend_factor)
|
||||||
.push_constant(Type::FLOAT, "inverse_gamma")
|
PUSH_CONSTANT(FLOAT, inverse_gamma)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_tone_map_simple.glsl")
|
COMPUTE_SOURCE("compositor_tone_map_simple.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,31 +5,33 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_van_vliet_gaussian_blur)
|
GPU_SHADER_CREATE_INFO(compositor_van_vliet_gaussian_blur)
|
||||||
.local_group_size(64, 4)
|
LOCAL_GROUP_SIZE(64, 4)
|
||||||
.push_constant(Type::VEC2, "first_feedback_coefficients")
|
PUSH_CONSTANT(VEC2, first_feedback_coefficients)
|
||||||
.push_constant(Type::VEC2, "first_causal_feedforward_coefficients")
|
PUSH_CONSTANT(VEC2, first_causal_feedforward_coefficients)
|
||||||
.push_constant(Type::VEC2, "first_non_causal_feedforward_coefficients")
|
PUSH_CONSTANT(VEC2, first_non_causal_feedforward_coefficients)
|
||||||
.push_constant(Type::VEC2, "second_feedback_coefficients")
|
PUSH_CONSTANT(VEC2, second_feedback_coefficients)
|
||||||
.push_constant(Type::VEC2, "second_causal_feedforward_coefficients")
|
PUSH_CONSTANT(VEC2, second_causal_feedforward_coefficients)
|
||||||
.push_constant(Type::VEC2, "second_non_causal_feedforward_coefficients")
|
PUSH_CONSTANT(VEC2, second_non_causal_feedforward_coefficients)
|
||||||
.push_constant(Type::FLOAT, "first_causal_boundary_coefficient")
|
PUSH_CONSTANT(FLOAT, first_causal_boundary_coefficient)
|
||||||
.push_constant(Type::FLOAT, "first_non_causal_boundary_coefficient")
|
PUSH_CONSTANT(FLOAT, first_non_causal_boundary_coefficient)
|
||||||
.push_constant(Type::FLOAT, "second_causal_boundary_coefficient")
|
PUSH_CONSTANT(FLOAT, second_causal_boundary_coefficient)
|
||||||
.push_constant(Type::FLOAT, "second_non_causal_boundary_coefficient")
|
PUSH_CONSTANT(FLOAT, second_non_causal_boundary_coefficient)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "first_causal_output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, first_causal_output_img)
|
||||||
.image(1, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "first_non_causal_output_img")
|
IMAGE(1, GPU_RGBA16F, WRITE, FLOAT_2D, first_non_causal_output_img)
|
||||||
.image(2, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "second_causal_output_img")
|
IMAGE(2, GPU_RGBA16F, WRITE, FLOAT_2D, second_causal_output_img)
|
||||||
.image(3, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "second_non_causal_output_img")
|
IMAGE(3, GPU_RGBA16F, WRITE, FLOAT_2D, second_non_causal_output_img)
|
||||||
.compute_source("compositor_van_vliet_gaussian_blur.glsl")
|
COMPUTE_SOURCE("compositor_van_vliet_gaussian_blur.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_van_vliet_gaussian_blur_sum)
|
GPU_SHADER_CREATE_INFO(compositor_van_vliet_gaussian_blur_sum)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "first_causal_input_tx")
|
SAMPLER(0, FLOAT_2D, first_causal_input_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "first_non_causal_input_tx")
|
SAMPLER(1, FLOAT_2D, first_non_causal_input_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "second_causal_input_tx")
|
SAMPLER(2, FLOAT_2D, second_causal_input_tx)
|
||||||
.sampler(3, ImageType::FLOAT_2D, "second_non_causal_input_tx")
|
SAMPLER(3, FLOAT_2D, second_non_causal_input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_van_vliet_gaussian_blur_sum.glsl")
|
COMPUTE_SOURCE("compositor_van_vliet_gaussian_blur_sum.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,25 +5,29 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_write_output_shared)
|
GPU_SHADER_CREATE_INFO(compositor_write_output_shared)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::IVEC2, "lower_bound")
|
PUSH_CONSTANT(IVEC2, lower_bound)
|
||||||
.push_constant(Type::IVEC2, "upper_bound")
|
PUSH_CONSTANT(IVEC2, upper_bound)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "input_tx")
|
SAMPLER(0, FLOAT_2D, input_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, output_img)
|
||||||
.compute_source("compositor_write_output.glsl");
|
COMPUTE_SOURCE("compositor_write_output.glsl")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_write_output)
|
GPU_SHADER_CREATE_INFO(compositor_write_output)
|
||||||
.additional_info("compositor_write_output_shared")
|
ADDITIONAL_INFO(compositor_write_output_shared)
|
||||||
.define("DIRECT_OUTPUT")
|
DEFINE("DIRECT_OUTPUT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_write_output_opaque)
|
GPU_SHADER_CREATE_INFO(compositor_write_output_opaque)
|
||||||
.additional_info("compositor_write_output_shared")
|
ADDITIONAL_INFO(compositor_write_output_shared)
|
||||||
.define("OPAQUE_OUTPUT")
|
DEFINE("OPAQUE_OUTPUT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_write_output_alpha)
|
GPU_SHADER_CREATE_INFO(compositor_write_output_alpha)
|
||||||
.additional_info("compositor_write_output_shared")
|
ADDITIONAL_INFO(compositor_write_output_shared)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "alpha_tx")
|
SAMPLER(1, FLOAT_2D, alpha_tx)
|
||||||
.define("ALPHA_OUTPUT")
|
DEFINE("ALPHA_OUTPUT")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -5,34 +5,37 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_z_combine_simple)
|
GPU_SHADER_CREATE_INFO(compositor_z_combine_simple)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "use_alpha")
|
PUSH_CONSTANT(BOOL, use_alpha)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "first_tx")
|
SAMPLER(0, FLOAT_2D, first_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "first_z_tx")
|
SAMPLER(1, FLOAT_2D, first_z_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "second_tx")
|
SAMPLER(2, FLOAT_2D, second_tx)
|
||||||
.sampler(3, ImageType::FLOAT_2D, "second_z_tx")
|
SAMPLER(3, FLOAT_2D, second_z_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "combined_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, combined_img)
|
||||||
.image(1, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "combined_z_img")
|
IMAGE(1, GPU_R16F, WRITE, FLOAT_2D, combined_z_img)
|
||||||
.compute_source("compositor_z_combine_simple.glsl")
|
COMPUTE_SOURCE("compositor_z_combine_simple.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_z_combine_compute_mask)
|
GPU_SHADER_CREATE_INFO(compositor_z_combine_compute_mask)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "first_z_tx")
|
SAMPLER(0, FLOAT_2D, first_z_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "second_z_tx")
|
SAMPLER(1, FLOAT_2D, second_z_tx)
|
||||||
.image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "mask_img")
|
IMAGE(0, GPU_R16F, WRITE, FLOAT_2D, mask_img)
|
||||||
.compute_source("compositor_z_combine_compute_mask.glsl")
|
COMPUTE_SOURCE("compositor_z_combine_compute_mask.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(compositor_z_combine_from_mask)
|
GPU_SHADER_CREATE_INFO(compositor_z_combine_from_mask)
|
||||||
.local_group_size(16, 16)
|
LOCAL_GROUP_SIZE(16, 16)
|
||||||
.push_constant(Type::BOOL, "use_alpha")
|
PUSH_CONSTANT(BOOL, use_alpha)
|
||||||
.sampler(0, ImageType::FLOAT_2D, "first_tx")
|
SAMPLER(0, FLOAT_2D, first_tx)
|
||||||
.sampler(1, ImageType::FLOAT_2D, "first_z_tx")
|
SAMPLER(1, FLOAT_2D, first_z_tx)
|
||||||
.sampler(2, ImageType::FLOAT_2D, "second_tx")
|
SAMPLER(2, FLOAT_2D, second_tx)
|
||||||
.sampler(3, ImageType::FLOAT_2D, "second_z_tx")
|
SAMPLER(3, FLOAT_2D, second_z_tx)
|
||||||
.sampler(4, ImageType::FLOAT_2D, "mask_tx")
|
SAMPLER(4, FLOAT_2D, mask_tx)
|
||||||
.image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "combined_img")
|
IMAGE(0, GPU_RGBA16F, WRITE, FLOAT_2D, combined_img)
|
||||||
.image(1, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "combined_z_img")
|
IMAGE(1, GPU_R16F, WRITE, FLOAT_2D, combined_z_img)
|
||||||
.compute_source("compositor_z_combine_from_mask.glsl")
|
COMPUTE_SOURCE("compositor_z_combine_from_mask.glsl")
|
||||||
.do_static_compilation(true);
|
DO_STATIC_COMPILATION()
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "gpu_shader_create_info.hh"
|
#include "gpu_shader_create_info.hh"
|
||||||
|
|
||||||
GPU_SHADER_CREATE_INFO(gpu_clip_planes)
|
GPU_SHADER_CREATE_INFO(gpu_clip_planes)
|
||||||
.uniform_buf(1, "GPUClipPlanes", "clipPlanes", Frequency::PASS)
|
UNIFORM_BUF_FREQ(1, GPUClipPlanes, clipPlanes, PASS)
|
||||||
.typedef_source("GPU_shader_shared.hh")
|
TYPEDEF_SOURCE("GPU_shader_shared.hh")
|
||||||
.define("USE_WORLD_CLIP_PLANES");
|
DEFINE("USE_WORLD_CLIP_PLANES")
|
||||||
|
GPU_SHADER_CREATE_END()
|
||||||
|
Loading…
Reference in New Issue
Block a user