I have an issue with pixel lighting in Unity 3b7. Since images speak louder than words, here you go:
This is how my sign looks in the Unity Editor. I am using a Bumped Specular shader. I have OpenGLES 2.0 emulation on (altho it looks the same with no emulation). This is as it should be.
This is how the sign renders on the actual device (iPod Touch 4th Gen, 8GB). You can see that the normal mapping is functioning correctly, but the light appears to be vertex lighting the front of the sign, which is a subdivided plane. I have tried it with a simple plane (two tris) and the vert lighting effect is even more pronounced (This is REALLY obvious as the shading lerps across the verts when you animate the light).
So I suppose my question is this: how do I make the output on the device match the output in the Editor? If the IPT is capable of pixel shaders/lighting, why am I getting this weird belnd of pixel and vertex lighting?
Answer by noradninja
Sep 14, 2010 at 02:17 PM
Figured it out! In the import options ofr the model, you have to set Unity to generate tangents for the model because the shader needs surface tangents to light properly. I feel kinda silly, but Im glad its working now.
Pixel shaders on the iPhone/iPodTouch...I think I am going to fall over from the coolness of it all :D
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
Trying to create 2D pixel art lighting
Help with adding a normalmap to a shader
Unity Surface Shader - Deferred lighting viewDir and lightDir
Light glow effect test
Lighting and lightmapping - OpenGL ES 1.1?