- Home /
Ugly 'Per Vertex'-Style Lighting No Matter What I Do
The screenshot is of the default sphere which I squashed a bit to make the ugly shading easier to see. It is still quite hard to see the problem in the screenshot, though it is much worse in game. You can see if you look carefully at the screenshot that there are darker lines extruding along the lines between vertices from the unlit parts of the sphere to the lit parts.
It is using the 'Default-Diffuse' material. The same happens no matter what shader I use. And no matter what mesh I use. I have the graphics quality set to 'fantastic' and am running it on a very powerful computer.
Does anybody else have this issue. How do I resolve it?
Thank you very much.
Answer by aeroson · Jan 07, 2014 at 02:28 PM
Is your camera set to forward or deferred rendering path ?
Thank you for your reply. It is using the forward rendering path. The deferred rendering path is only available in Unity Pro. Is this really the problem? In the Unity documentation under forward rendering it says:
'Forward is a shader-based rendering path. It supports per-pixel lighting (including normal maps & light Cookies) and realtime shadows from one directional light. In the default settings, a small number of the brightest lights are rendered in per-pixel lighting mode. The rest of the lights are calculated at object vertices.'
Since I only have one light in my scene, it sounds like it should be doing per-pixel lighting with no per-vertex lighting.
You are right, no matter what i do it still happens (even in blender). I think it is because normals are interpolated lineary. If you want more rounded sphere try to use normals maps or increase the vertices count. Also i don't think doing so will help, the spheres looks just fine unless you squash them, because you are squashing normals as well.
I can't afford to increase the vertex count. The problem is still there when I don't squash the sphere. It is just harder to see.
This seems pretty ridiculous. When I was working directly with C++ and DirectX/HLSL I never had this problem. Everything was perfectly smooth.
Let's see what you were doing. I don't think you can do better than Nlerp with verts and shaders; Slerp isn't possible without knowledge of other vertices.
Answer by greencvbn · Jan 07, 2014 at 04:39 PM
the problem may be from running the graphics on fantastic the detail may just not be their to see super well. is this a large object or something smaller because if you change the scale of some objects it changes the shading partally. the black lines on your shape look like the grid that comes from a mesh maby your object needs to not have a mesh. these are just ideas to experiment with.
The problem persists on all graphics quality settings. It also persists if I don't perform any scaling. I don't know what you mean by not having a mesh. How can you have a visible object without a mesh?