From bc8b15f1a532b078fcc4072295c442d140cdbc06 Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Wed, 2 Nov 2022 13:55:23 +0200 Subject: Realtime Compositor: Move shaders to compositor module This patch moves the GLSL shaders and their infos to the compositor module as decided by the EEVEE & Viewport module. This is a non functional change. Differential Revision: https://developer.blender.org/D16360 Reviewed By: Clement Foucault --- .../shaders/compositor/compositor_box_mask.glsl | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 source/blender/gpu/shaders/compositor/compositor_box_mask.glsl (limited to 'source/blender/gpu/shaders/compositor/compositor_box_mask.glsl') diff --git a/source/blender/gpu/shaders/compositor/compositor_box_mask.glsl b/source/blender/gpu/shaders/compositor/compositor_box_mask.glsl deleted file mode 100644 index fad23f28fde..00000000000 --- a/source/blender/gpu/shaders/compositor/compositor_box_mask.glsl +++ /dev/null @@ -1,27 +0,0 @@ -#pragma BLENDER_REQUIRE(gpu_shader_compositor_texture_utilities.glsl) - -void main() -{ - ivec2 texel = ivec2(gl_GlobalInvocationID.xy); - - vec2 uv = vec2(texel) / vec2(domain_size - ivec2(1)); - uv -= location; - uv.y *= float(domain_size.y) / float(domain_size.x); - uv = mat2(cos_angle, -sin_angle, sin_angle, cos_angle) * uv; - bool is_inside = all(lessThan(abs(uv), size)); - - float base_mask_value = texture_load(base_mask_tx, texel).x; - float value = texture_load(mask_value_tx, texel).x; - -#if defined(CMP_NODE_MASKTYPE_ADD) - float output_mask_value = is_inside ? max(base_mask_value, value) : base_mask_value; -#elif defined(CMP_NODE_MASKTYPE_SUBTRACT) - float output_mask_value = is_inside ? clamp(base_mask_value - value, 0.0, 1.0) : base_mask_value; -#elif defined(CMP_NODE_MASKTYPE_MULTIPLY) - float output_mask_value = is_inside ? base_mask_value * value : 0.0; -#elif defined(CMP_NODE_MASKTYPE_NOT) - float output_mask_value = is_inside ? (base_mask_value > 0.0 ? 0.0 : value) : base_mask_value; -#endif - - imageStore(output_mask_img, texel, vec4(output_mask_value)); -} -- cgit v1.2.3