- Home /
Poor spotlight gradient in Unity
As a test I want to put a cube on a plane and have a spotlight cast light on it. I want the spotlight to be the only source of light to create a very dark feeling.
However, the spotlight creates a gradient on the ground that looks very poor. It looks like something in a highly compressed JPG image, not at all something you want to see in a game.
In the attachments you can see the project lightning and quality settings as well as the settings of the spotlight itself. You can also see the actual render of the gradient, you'll notice where one color ends and another begins very clearly. It appears like this even if I build and run the game as a stand-alone program. Notice that nothing is baked, I want the light to be rendered in realtime.
I don't think it's my computer's graphics card that is causing it. What am I doing wrong?
Mirrors of the attached images: http://i.imgur.com/FKPqQV7.png http://i.imgur.com/QPxuI1L.png
Hi, is what you see color banding ? If it is, sometimes there is nothing to do: when 2 colors are too close, there is not enough colors "between them" and banding occurs.
To be sure, you could try with more distant colors i.e. a pure white light (& pure black shadow): is there still banding ?
Try getting a screenshot of your game in an image editor and check the RGB values of the colors: you'll be able to see if there could be other values between those bands or not.
Holy crap, you're right! I just checked the hex color values of my screenshot and not a single color fits between them. It was just color banding. Crazy that we have such a limitation to work around in this day and age. Thanks for pointing out the problem for me mate.
Answer by Mackam · May 12, 2015 at 01:11 PM
It was just color banding (see comments above).