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

Author Topic: Let There Be Light 2  (Read 52420 times)

0 Members and 1 Guest are viewing this topic.

Hapax

  • Hero Member
  • *****
  • Posts: 2741
  • My number of posts is shown in hexadecimal.
    • View Profile
Re: Let There Be Light 2
« Reply #165 on: July 29, 2019, 02:37:28 am »
Is there a way to only draw the lights for each lightSystem and not the dark parts?  :o
You could try drawing the second one using an additive blend mode.
See BlendMode documentation.
Selba Ward - SFML drawables
Kairos - Timing Library
Rectangular Boundary Collision - Rectangular SAT Collision

@Hapaxiation - Hapaxia on Twitter

Guido Bisocoli

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Let There Be Light 2
« Reply #166 on: July 29, 2019, 05:32:40 pm »
Thanks for the answer, but that didn't work, it still draws the dark parts twice and the lights very strong, that's not the result I want.
Maybe I need to create other sprites (penumbraTexture.png, etc.) with the dark parts as transparent for the second lightsystem. I don't know how to do that but I'll mess around with GIMP and see what's the result.

If lolz or someone has another easy answer for using 2 light systems it would be great.

 

anything