-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird light behaviour on Unity 2017.1 #5
Comments
Hmm, This is not happening to me, if you have alot of lights maybe you should check the light importance from Auto to Important may fix you issue. |
This happens because there is only a fixed, hard-coded amount of lights that can be processed. Therefore, you have too many lights in the same area and they clash. I believe the vertex lighting is actually a single line in the shaders because it's using one of Unity's std shader functions for that. You can find the source for that function by searching for it on google, and then copy and paste that into your shader and modifying it to account for more lights. However beware of performance hits, there is a reason vertex lighting was quickly dismissed for better methods in the past, like deferred lighting. |
Yeah, that's exactly it! I found the line you was talking about, it's the Also, the game level is a giant big mesh. Do you think that splitting this mesh into small areas and setting about 4 or 5 lights on each of them would help? |
Splitting your giant level mesh will help A LOT for all kinds of reasons, frustum culling being a big one. |
First I would like to thank the creator of this shader, because it's amazing! It really gives the game a nice retro feel.
So I ran into issue where some lights stops illuminating a
vertexlit
material depending on the angle. I'm not sure why , as it doesn't happen with all the lights and not in all environments. Tried with default options and nothing changes.Examples:
https://streamable.com/jdq4n
https://streamable.com/a8t3f
Any tips?
The text was updated successfully, but these errors were encountered: