mesh normals get normalized in OpenGLES but not DirectX/OpenGL

Hi,

I am porting some of my PC/mac unity shaders to IOS OpenGLES. In one shader I am using mesh normals to store vertex displacement information (basically a vector3 that is not normalized).
This works fine in DirectX/OpenGL, the vector3 values that I pass to the shader using the normals array are not modified in the process.
However, in OpenGLES, my vector3 values are normalized when I access them in the vertex shader.

I was wondering whether this was an OpenGLES limitation of some kind, or if it should be considered a Unity implementation bug… Has anyone stumbled upon this issue?

So?
Vector3 normalization when submitting normals to the shader on OpenGLES, Bug or feature?

I would say bug since this creates an inconsistency between DirectX/OpenGL shaders and OpenGLES shaders.
The question is, why are these vectors normalized before being submitted to the shader? I didn’t see anything in the OpenGLES spec that dictates that (but I might have overlooked something)

Any thoughts?

Bump !

I’m really stuck on that problem too :frowning:

http://forum.unity3d.com/threads/132016-Normal-values-on-iOS?p=1500511&viewfull=1#post1500511

Please someone help !

Yay !

Solution found here : http://forum.unity3d.com/threads/140557-How-to-stop-shader-compiler-applying-Normalize-to-normals

:slight_smile: