Hello Guest

Author Topic: Can you make a sprite black when not lit?  (Read 4260 times)

MyNameIsDonovan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Can you make a sprite black when not lit?
« on: July 04, 2013, 06:50:52 pm »
Hello all, its me again asking another possibly extremely noobish question.
I want my sprites to black out when there's no light on them, so things will remain "hidden" until the players light source hits them.
I tried using the tk2D shaders, but they just slightly grayed them out.
Is there a way to achieve this?

profanicus

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 167
    • View Profile
Re: Can you make a sprite black when not lit?
« Reply #1 on: July 04, 2013, 11:56:57 pm »
The first thing that comes to mind is that you'll need to turn off ambient lighting in render settings, and make sure you are using the tk2d Lit shaders..

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Can you make a sprite black when not lit?
« Reply #2 on: July 05, 2013, 09:05:07 am »
Yup, I'm pretty sure it is ambient thats making it grey.

MyNameIsDonovan

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Can you make a sprite black when not lit?
« Reply #3 on: July 05, 2013, 06:28:52 pm »
You guys are the best!!!
Although I couldn't find where to turn off ambient lighting, I just set it to Black. I'm getting the results I wanted so I'm happy :D

Thanks guys!

profanicus

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 167
    • View Profile
Re: Can you make a sprite black when not lit?
« Reply #4 on: July 05, 2013, 11:08:05 pm »
Lol sorry, 'turn off' = set it to zero = make it black, you did the right thing.