• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Joshdbb · Dec 03, 2014 at 04:54 PM · 2dlightingspritepoint-lightuneven

Uneven lighting across sprites

I am trying to add simple point lighting to my 2D game but things aren't behaving how I would expect.

I created a test scene to demonstrate the strange behaviour: alt text

Here you can see two SpriteRenderers with the Sprites/Diffuse shader drawing the squares. On top of the left sprite there is a red point light. In-between the sprites there is a blue point light. Both sprites have z=0, both lights have z=-0.5. Everything looks as it should.

alt text

Here I have added a second red point light above the right sprite. As you can see the blue light is no longer visible on the right square.

If you decrease the intensity of the right red light you are able to see the blue light again but much weaker than it should be.

I have also noticed that if I move the right square further right (away from the blue light) things render as they should.

Am I dong something wrong?

Thanks

screen shot 2014-12-03 at 16.33.34.png (49.2 kB)
screen shot 2014-12-03 at 16.33.23.png (42.4 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Joshdbb · Dec 04, 2014 at 07:25 PM

Figured it out. I needed to increase the 'Pixel Light Count' in the 'Quality' settings.

The problem was that the right hand square had three point lights on it so the blue light switched to a vertex light instead of a pixel light.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image codingroosters · Jul 02, 2019 at 06:21 AM 0
Share

Thank you so much! You're a life-saver :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Lighting 2d Sprites in 3d environment 0 Answers

Multiple lights disable additive intensity for Sprites-Diffuse? 0 Answers

Is it possible (how?) to hide a light effect with a 2D sprite? 0 Answers

Sprite's alpha visible with lighting 0 Answers

Unity 4.3 (2D) particle system not showing 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges