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

Author Topic: Extremely simple lighting techniques?  (Read 2961 times)

0 Members and 2 Guests are viewing this topic.

Jungletoe

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Extremely simple lighting techniques?
« on: June 23, 2013, 05:56:40 pm »
Hi,

At the moment, my lighting system is extremely basic. I simply lay a VertexArray over the whole screen and slowly modify its alpha channel to simulate a day/night system. However, I need to add campfires and torches, both which require a simple circular lighting radius where there is more transparency in the filter.

At the moment, I just put a yellow alpha image over where the campfire is. The only problem is that this can end up happening if there are too many fires in one area:



Is there any way to do a simple lighting system WITHOUT shadows and WITHOUT rendertextures? I want to support as many machines as possible (not to mention that my own computer can't handle rendertextures).

This is what I'm going for:

« Last Edit: June 23, 2013, 06:06:10 pm by Jungletoe »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Extremely simple lighting techniques?
« Reply #1 on: June 23, 2013, 06:04:30 pm »
It will be hard without a render-texture.

But render-textures should work everywhere: there's a fallback in case FBOs are not supported, and all FBOs that have been reported so far have been fixed.

Could you please report your problems with render-textures so that I can investigate?
Laurent Gomila - SFML developer

Jungletoe

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Re: Extremely simple lighting techniques?
« Reply #2 on: June 23, 2013, 06:07:59 pm »
Could you please report your problems with render-textures so that I can investigate?

Sure. How recently have they been fixed? I'm running SFML 2.0 from the latest build last October.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Extremely simple lighting techniques?
« Reply #3 on: June 23, 2013, 06:12:20 pm »
Quote
I'm running SFML 2.0 from the latest build last October.
What does "latest build" mean? ???
SFML 2.0 was released in april. And it's the latest version.
Laurent Gomila - SFML developer

Jungletoe

  • Full Member
  • ***
  • Posts: 132
    • View Profile
    • Email
Re: Extremely simple lighting techniques?
« Reply #4 on: June 23, 2013, 06:14:49 pm »
Quote
I'm running SFML 2.0 from the latest build last October.
What does "latest build" mean? ???
SFML 2.0 was released in april. And it's the latest version.

I meant that I downloaded "the latest build" that was available last October. I haven't downloaded it since then, so my SFML2 version is from a while ago, which is why I was wondering when you fixed these problems.
« Last Edit: June 23, 2013, 06:22:25 pm by Jungletoe »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Extremely simple lighting techniques?
« Reply #5 on: June 23, 2013, 07:37:09 pm »
I don't remember, but you should definitely use the official release now.
Laurent Gomila - SFML developer

 

anything