blob: 866b9045da2ca198b2dabd117563dbc9b5f4acc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#pragma BLENDER_REQUIRE(gpu_shader_compositor_texture_utilities.glsl)
void main()
{
ivec2 texel = ivec2(gl_GlobalInvocationID.xy);
#if defined(SPLIT_HORIZONTAL)
bool condition = (view_size.x * split_ratio) < texel.x;
#elif defined(SPLIT_VERTICAL)
bool condition = (view_size.y * split_ratio) < texel.y;
#endif
vec4 color = condition ? texture_load(first_image_tx, texel) :
texture_load(second_image_tx, texel);
imageStore(output_img, texel, color);
}
|