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

Author Topic: PostFX for computors without support for it  (Read 3526 times)

0 Members and 1 Guest are viewing this topic.

EClaesson

  • Newbie
  • *
  • Posts: 13
    • MSN Messenger - emanuel.claesson@gmail.com
    • View Profile
    • Email
PostFX for computors without support for it
« on: August 11, 2009, 02:52:15 am »
Hi there.

I'm sitting on a fairly new Laptop (yes i know, crappy gfx-card) but it at least support PixelShader 2.0. But i guess the total lack of any VertexShader support and HW T & L is the problem.

Is it possible to run PostFX on gfx-cards like mine?

I have my small plans on implementing my own, using some lightweight scripting language such as GameMonkey. This could use GetPixel() to get the color and give me the new color. The problem i have is that there are no SetPixel() (afaik).

Laurent, take this as a feature request maybe? :wink:

Would this bee way too slow? It may mean that every pixel of the screen has to be read and written every frame.

Thanks in advance for your answers.  :)
//Emanuel Claesson

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PostFX for computors without support for it
« Reply #1 on: August 11, 2009, 07:54:37 am »
Quote
Is it possible to run PostFX on gfx-cards like mine?

Not if sf::PostFX::CanUsePostFX() returns false.

Quote
This could use GetPixel() to get the color and give me the new color. The problem i have is that there are no SetPixel() (afaik).

sf::Image::SetPixel(x, y, color).

Quote
Would this bee way too slow? It may mean that every pixel of the screen has to be read and written every frame.

Definitely. At least you should directly work on the array of pixels, and re-uploading them once per frame with sf::Image::LoadFromPixels.
Laurent Gomila - SFML developer

EClaesson

  • Newbie
  • *
  • Posts: 13
    • MSN Messenger - emanuel.claesson@gmail.com
    • View Profile
    • Email
PostFX for computors without support for it
« Reply #2 on: August 11, 2009, 10:33:18 am »
Quote
Definitely.

Definitely.. too slow?
//Emanuel Claesson

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PostFX for computors without support for it
« Reply #3 on: August 11, 2009, 10:43:29 am »
Quote
Definitely.. too slow?

Yep. Especially if you target old configurations.
Laurent Gomila - SFML developer

EClaesson

  • Newbie
  • *
  • Posts: 13
    • MSN Messenger - emanuel.claesson@gmail.com
    • View Profile
    • Email
PostFX for computors without support for it
« Reply #4 on: August 11, 2009, 10:45:07 am »
Quote
Yep. Especially if you target old configurations.


Not old really. Just for systems which doesn't support advanced shaders. Like my laptop, dualcore cpu, 2gb ram, weak/integrated gfx-card and such.
//Emanuel Claesson

EClaesson

  • Newbie
  • *
  • Posts: 13
    • MSN Messenger - emanuel.claesson@gmail.com
    • View Profile
    • Email
PostFX for computors without support for it
« Reply #5 on: August 12, 2009, 03:48:57 pm »
Quote from: "Laurent"
At least you should directly work on the array of pixels, and re-uploading them once per frame with sf::Image::LoadFromPixels.


Does LoadFromPixels want a miltidimensional array, or a "single"? And what type does it expect the pixel values to be?
//Emanuel Claesson

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
PostFX for computors without support for it
« Reply #6 on: August 12, 2009, 03:59:41 pm »
Quote
Does LoadFromPixels want a miltidimensional array, or a "single"? And what type does it expect the pixel values to be?

It's all in the documentation ;)

--> Single array of 8-bits RGBA components.
Laurent Gomila - SFML developer

 

anything