Fragment shader - color by position

Started by Thomas., July 08, 2012, 09:35:45 PM

Previous topic - Next topic

Thomas.

Is possible to get color in fragment shader from current image buffer by position? I can't find any info about it on the internet...

EgonOlsen

#1
No, that's not possible...it would ease a lot of things, but it's not possible... :(

Thomas.

#2
So, if I want this effect (windows in rooms, which deforming image), I have to render scene to target, render depth, render final effect and somehow checking it with depth? Damn it, I want just color from image buffer :-\

edit: something like portal, which is in this tech demo ... http://www.youtube.com/watch?v=Q9MEvP_RXCY

EgonOlsen

Something like that...i don't know exactly how to do this, but you have no access to the framebuffer in the shader.

Thomas.

This is effect, that I mean (distortion is from texture), on photo. I'll try to do transparent glass.