Welcome to mirror list, hosted at ThFree Co, Russian Federation.

compositor_flip.glsl « compositor « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 919c454ee631426ae0f8efbfde306505c31eb81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma BLENDER_REQUIRE(gpu_shader_compositor_texture_utilities.glsl)

void main()
{
  ivec2 texel = ivec2(gl_GlobalInvocationID.xy);
  ivec2 size = texture_size(input_tx);
  ivec2 flipped_texel = texel;
  if (flip_x) {
    flipped_texel.x = size.x - texel.x - 1;
  }
  if (flip_y) {
    flipped_texel.y = size.y - texel.y - 1;
  }
  imageStore(output_img, texel, texture_load(input_tx, flipped_texel));
}