SFML community forums

Help => Graphics => Topic started by: Zamadatix on November 21, 2010, 12:50:02 am

Title: Post Effects question
Post by: Zamadatix on November 21, 2010, 12:50:02 am
Is it possible to have a post effect return a variable (other than pixel data) back to the program directly?
Title: Post Effects question
Post by: Spodi on November 21, 2010, 05:00:09 am
Generally, if you want to grab values out from the GPU and bring it back into system memory, you will want to write it to a texture. Basically just like drawing, but the generated image isn't for the purpose of displaying.
Title: Post Effects question
Post by: Zamadatix on November 21, 2010, 03:58:46 pm
So the simplest/fastest way I can do this is to pass 4 floats per pixel (vec4's) of a texture and use sfml to read the pixel data of the texture?
Title: Post Effects question
Post by: Spodi on November 21, 2010, 09:03:13 pm
This might be a good resource to read for the basics on GPGPU:

http://www.mathematik.uni-dortmund.de/~goeddeke/gpgpu/tutorial.html