fadeFragmentShader.glsl 778 B

1234567891011121314151617181920212223
  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /*
  3. * This file is part of the LibreOffice project.
  4. *
  5. * This Source Code Form is subject to the terms of the Mozilla Public
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8. */
  9. #version 120
  10. uniform sampler2D leavingSlideTexture;
  11. uniform sampler2D enteringSlideTexture;
  12. uniform float time;
  13. varying vec2 v_texturePosition;
  14. void main() {
  15. vec4 leavingFragment = texture2D(leavingSlideTexture, v_texturePosition);
  16. vec4 enteringFragment = texture2D(enteringSlideTexture, v_texturePosition);
  17. gl_FragColor = mix(leavingFragment, enteringFragment, time);
  18. }
  19. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */