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

Author Topic: Changing gamma, brightness and contrast  (Read 4720 times)

0 Members and 1 Guest are viewing this topic.

shiroaisu

  • Newbie
  • *
  • Posts: 28
    • View Profile
Changing gamma, brightness and contrast
« on: January 12, 2011, 12:56:37 pm »
Hi.

I would like to know if there is any way to change the gamma, brightness and contrast of the window using SFML.

tks in advance.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Changing gamma, brightness and contrast
« Reply #1 on: January 12, 2011, 07:18:01 pm »
The only "easy" way that I can think of, is to use a shader.
Laurent Gomila - SFML developer

shiroaisu

  • Newbie
  • *
  • Posts: 28
    • View Profile
Changing gamma, brightness and contrast
« Reply #2 on: January 12, 2011, 07:29:23 pm »
yes i tought of that too, but that would only change the brigtness, what about the contrast?? is there anyway to change it?

AlexM

  • Newbie
  • *
  • Posts: 18
    • View Profile
Changing gamma, brightness and contrast
« Reply #3 on: January 12, 2011, 07:43:51 pm »
You should be able to make a contrast filter via shaders as well.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Changing gamma, brightness and contrast
« Reply #4 on: January 12, 2011, 08:36:08 pm »
As long as there's a formula that can process RGBA and can output RGBA, you can do it with a shader.
Laurent Gomila - SFML developer

shiroaisu

  • Newbie
  • *
  • Posts: 28
    • View Profile
Changing gamma, brightness and contrast
« Reply #5 on: January 12, 2011, 10:16:05 pm »
Ok thanks for the replies :)