opengl shader make color "disappear"
Posted
by
JFoulkes
on Stack Overflow
See other posts from Stack Overflow
or by JFoulkes
Published on 2011-02-10T19:14:10Z
Indexed on
2011/02/15
15:25 UTC
Read the original article
Hit count: 234
hi,
I'm new to opengl and shaders. I'm trying to do some augmented reality on the iphone and messing about with shaders to alter a feed from the camera.
What I'm trying to achieve is the appearance that an object in a picture has disappeared by setting the color to match the surrounding colour. I have a yellow rectangle and in it is a small red circle. I want to give the impressed the red circle has disappeared by setting the colour to be yellow.
It won't always be solid colours but I'm just trying to get the basics down first.
Currently I have a simple shader which will make a red colour lighter but this isn't ideal because it doesn't get close to the surrounding colour and I want this to work for different coloured objects and different coloured surrounding.
I'm not even 100% shaders are what I need to be looking at or even opengl. I'm using it because of the performance it gives on the iPhone.
I'm basically asking if:
- Anyone has done or seen anything similar
- Am I barking up the wrong tree using opengl es and opengl sl?
- Is this even possible?
Cheers.
© Stack Overflow or respective owner