Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Post Effects question  (Read 2615 times)

0 Members and 1 Guest are viewing this topic.

Zamadatix

  • Newbie
  • *
  • Posts: 27
    • View Profile
Post Effects question
« 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?

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
Post Effects question
« Reply #1 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.

Zamadatix

  • Newbie
  • *
  • Posts: 27
    • View Profile
Post Effects question
« Reply #2 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?

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
Post Effects question
« Reply #3 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

 

anything