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

Author Topic: Lighting?  (Read 3610 times)

0 Members and 1 Guest are viewing this topic.

eleinvisible

  • Newbie
  • *
  • Posts: 47
    • View Profile
Lighting?
« on: April 18, 2008, 12:07:15 am »
I was just "checking under the hood" and from what I see SFML is OpenGL based for graphics. So I was wondering if their is or will be support for lighting?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Lighting?
« Reply #1 on: April 18, 2008, 03:10:41 am »
Lighting is mostly a 3D thing, to provide real 2D lighting I'd have to use pixel shaders which is not an option in this context :)

However, you can easily fake some lighting by using colored shapes or sprites with additive or multiplicative blending.

You could as well use pixel shaders through post-fx for more complex lighting.
Laurent Gomila - SFML developer

Kingdom of Fish

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Lighting?
« Reply #2 on: April 18, 2008, 09:55:20 am »
Isn't per-sprite-pixel-shader a planned feature?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Lighting?
« Reply #3 on: April 18, 2008, 10:11:37 am »
Yes it is.
Laurent Gomila - SFML developer