Results 1 to 2 of 2

Thread: Blending a variable number of images

  1. #1
    Newbie Newbie
    Join Date
    Feb 2014

    Blending a variable number of images

    Hello to you all,

    Like a lot of people, i'm a complete newbie in opengl, and i need your help to point me out in the right direction. I'm working on a software which combines multiple streams (video or images) and shows them up on the screen.

    Till now I used OpenCL for all the image processing ( scaling, filtering etc.) and summed all the images up in a final kernel which would take two images, combine them and use the result as a input in a loop.

    Basically, say my kernel name is "overlap", and i call it n times:
    1. Image1+Image2=Result
    2. Result +Image3=Result
    3. Result +Image4=Result
    n. Result +Imagen=Result

    Now i wanted to migrate all the code in a 3D space to add some effects, that's the reason i started using OpenGL. For now I learned how to combine two images together by using a simple vertex+fragment shader.

    My question is how can I iterate this process, and use the output of the fragment shader as an input of the same process. What i mean is transforming the output in a texture, assigning it to a quand and use it as input for next iteration.
    Or have vertex+fragment shaders which will take in input a variable number of images, something i would prefer actually as opposed to the reasoning i'm using right now.

    The end goal for me is to have option to dynamically add or delete a "layer"

    What am I missing, how can this be done in OpenGL ?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    variable number of images

    Have a look at sparse texture arrays. You could also look at compute shaders which are similar to OpenCL

Similar Threads

  1. Replies: 3
    Last Post: 02-11-2018, 09:43 PM
  2. Number of images created in a swapchain
    By theDancer in forum Vulkan
    Replies: 2
    Last Post: 06-09-2017, 03:32 AM
  3. Variable number of clip planes and gl_ClipDistance
    By OctoOcto in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 11-30-2016, 02:37 PM
  4. Replies: 0
    Last Post: 03-07-2013, 10:17 PM
  5. blending two images
    By Alessandro_dup1 in forum OpenGL: GLSL
    Replies: 5
    Last Post: 01-03-2005, 06:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean