Hello guys,
is it possible to export a calculated value from a fragmentshader back to the vertexshader?
I try to implement a kind of realtime video composer.
I have a bluebox video, wich is mapped as a texture on a plane. I use realtime chroma-keying to set the blue background transparent and then i have to realize some kind of “object-tracking” (tracking the position of the feet of an actor) to move the videoplane in a maya-scene.
My first idea was to save this value in a texture-unit, and than read this value with a texture-lookup in the vertexshader. But there is no way to get write-access on a texture-unit.
So i use the framebuffer to save this value in a pixel and use glReadPixels() to get this value. But it is very slow. I have to use two for-loops to read pixel per pixel of my videotexture.
Is anyone having an idea how i can resolve this problem in a better way? It´s very importand for me, because it´s a part of my diploma thesis!
P.S.: I hope somebody understands my “good” english.