0
\$\begingroup\$

I have a scene that contains 3 elements:

  • Main Camera
  • A 2D Sprite that renders a single white pixel image, scaled to 2000 x 1000
  • A point light with a yellow color

What should be done so that the light is actually rendered on the sprite?

I have recorded a short video showcasing the issue: https://www.youtube.com/watch?v=g2iZB6BXhPs

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

It sounds like you are using the default sprite material, which does not perform lighting computations.

If you would like to use 3D lighting, create a new Material, and set its shader to Sprites/Diffuse, then assign that material to your sprite.

\$\endgroup\$
5
  • \$\begingroup\$ I see the material Sprites/Diffuse also affects the Sprites original color. Is there any way to not have that affected? \$\endgroup\$ Commented Mar 31, 2021 at 19:11
  • \$\begingroup\$ Did you mean to increase the ambient light in your scene, to light up the parts of your sprite that are not being illuminated by the point light? \$\endgroup\$ Commented Mar 31, 2021 at 19:19
  • \$\begingroup\$ youtu.be/3R_wgEIRTUs The sprite has a dark blue-ish color before applying the Sprites/Diffuse material. After I apply the material it turns black and it's affected by light sources. But is it possible to keep the original color and have light sources affect over that initial color? \$\endgroup\$ Commented Mar 31, 2021 at 19:30
  • \$\begingroup\$ This is kind of like asking "Why is it dark in my house when the sun goes down?" - well, did you turn on the lights? By using a lit material, you are telling Unity, "Please make this object bright where light hits it and dark wherever there is no light hitting it". If you want it to be bright, then it is your job to shine light on it until it's as bright as you want it to be. You can adjust the amount of ambient light in your scene's Lighting settings to do this. \$\endgroup\$ Commented Mar 31, 2021 at 19:34
  • \$\begingroup\$ I see your point. Was a stupid question from my side. Playing with the scene's ambient light solved it. Thanks a lot for the help @DMGregory \$\endgroup\$ Commented Mar 31, 2021 at 19:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.