diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-10-04 16:20:32 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-10-04 16:20:32 +0300 |
commit | 813a940dfafa46e9936b013946ecffcbec7baeb1 (patch) | |
tree | c89b3da530dfdda87967f4b5059a5ff9e4568df9 /source/blender/gpu/shaders | |
parent | 71bb98ca97617a4d2102b6f08198015f66e835ad (diff) |
Remove falloffshape variations. Making space for masking.
Diffstat (limited to 'source/blender/gpu/shaders')
3 files changed, 4 insertions, 29 deletions
diff --git a/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh b/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh index 838a198a367..97eed0237f4 100644 --- a/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh +++ b/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh @@ -35,35 +35,12 @@ GPU_SHADER_CREATE_INFO(sculpt_paint_image_merge_compute) GPU_SHADER_CREATE_INFO(sculpt_paint_test_sphere).define("BRUSH_TEST_SPHERE"); GPU_SHADER_CREATE_INFO(sculpt_paint_test_circle).define("BRUSH_TEST_CIRCLE"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_custom).define("BRUSH_CURVE_PRESET 0"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_smooth).define("BRUSH_CURVE_PRESET 1"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_sphere).define("BRUSH_CURVE_PRESET 2"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_root).define("BRUSH_CURVE_PRESET 3"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_sharp).define("BRUSH_CURVE_PRESET 4"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_lin).define("BRUSH_CURVE_PRESET 5"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_pow4).define("BRUSH_CURVE_PRESET 6"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_invsquare).define("BRUSH_CURVE_PRESET 7"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_constant).define("BRUSH_CURVE_PRESET 8"); -GPU_SHADER_CREATE_INFO(sculpt_paint_falloff_smoother).define("BRUSH_CURVE_PRESET 9"); - #define SCULPT_PAINT_FINAL_VARIATION(name, ...) \ GPU_SHADER_CREATE_INFO(name).additional_info(__VA_ARGS__).do_static_compilation(true); -#define SCULPT_PAINT_CURVE_VARIATION(name, ...) \ - SCULPT_PAINT_FINAL_VARIATION(name##_custom, "sculpt_paint_falloff_custom", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_smooth, "sculpt_paint_falloff_smooth", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_sphere, "sculpt_paint_falloff_sphere", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_root, "sculpt_paint_falloff_root", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_sharp, "sculpt_paint_falloff_sharp", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_lin, "sculpt_paint_falloff_lin", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_pow4, "sculpt_paint_falloff_pow4", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_invsquare, "sculpt_paint_falloff_invsquare", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_constant, "sculpt_paint_falloff_constant", __VA_ARGS__) \ - SCULPT_PAINT_FINAL_VARIATION(name##_smoother, "sculpt_paint_falloff_smoother", __VA_ARGS__) - #define SCULPT_PAINT_TEST_VARIATIONS(name, ...) \ - SCULPT_PAINT_CURVE_VARIATION(name##_sphere, "sculpt_paint_test_sphere", __VA_ARGS__) \ - SCULPT_PAINT_CURVE_VARIATION(name##_circle, "sculpt_paint_test_circle", __VA_ARGS__) + SCULPT_PAINT_FINAL_VARIATION(name##_sphere, "sculpt_paint_test_sphere", __VA_ARGS__) \ + SCULPT_PAINT_FINAL_VARIATION(name##_circle, "sculpt_paint_test_circle", __VA_ARGS__) SCULPT_PAINT_TEST_VARIATIONS(sculpt_paint_image, "sculpt_paint_image_compute") diff --git a/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_comp.glsl b/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_comp.glsl index 4fea3dd353d..2f3a4e3e1c8 100644 --- a/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_comp.glsl +++ b/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_comp.glsl @@ -48,7 +48,7 @@ void main() } // TODO: blend with color... float factor = SCULPT_hardness_factor(distance, step_data.hardness, step_data.radius); - float curve_factor = SCULPT_curve_strength(factor, BRUSH_CURVE_PRESET); + float curve_factor = SCULPT_curve_strength(factor, paint_brush_buf.falloff_shape); vec4 final_paint_color = SCULPT_blend_color( color, paint_brush_buf.color * curve_factor * step_data.strength); final_paint_color *= paint_brush_buf.alpha; diff --git a/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_merge_comp.glsl b/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_merge_comp.glsl index 80762e1d2df..5248aa87a80 100644 --- a/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_merge_comp.glsl +++ b/source/blender/gpu/shaders/sculpt_paint/sculpt_paint_image_merge_comp.glsl @@ -4,7 +4,5 @@ void main() ivec2 coord_out = coord_in; vec4 paint_color = imageLoad(in_paint_img, coord_in); paint_color.a = 1.0; - vec4 canvas_color = imageLoad(out_img, coord_out); - vec4 out_color = max(canvas_color, paint_color); - imageStore(out_img, coord_out, out_color); + imageStore(out_img, coord_out, paint_color); }
\ No newline at end of file |