MeshStandardMaterial issue with normalMap
See original GitHub issueHi there! Thanks for the job guys!
Problem: When a normalMap is set to a MeshStandardMaterial we don’t get any visual “normal” effects and no warnings in OSX + any browser. All the other maps work: map, envMap, roughnessMap and metalicMap.
We’ve tried with many textures that work with MeshPhongMaterial to no sucess. Sizes tested: 256x256, 1024x1024 & 2048x2048, normal jpg textures.
When we use iOS 10 we get the following warning and no map is shown (and thus the texture is black):
WARNING: 0:256: Overflow in implicit constant conversion, minimum range for lowp float is (-2,2)
The same happens on some other computers (Win).
If we don’t set the normalMap the texture works Ok on iOS, but of course, we lack of bumps. I we set bumpMap instead no warning appears, the material appears ok in the screen but without bumps.
Three.js version
- [] Dev
- r81
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- Linux
- Android
- IOS
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (5 by maintainers)

Top Related StackOverflow Question
Thanks @WestLangley, that example works. But, as I mentioned, there are two examples that don’t work well with normal maps. I attached screenshots of the errors.
Some might work and some might not. That is the problem, its reliability.
I took a look at the shader chunk and followed a link to the inspiration source of it. There it says that sometimes the approach might break down whenever some conditions on the models met (check the part “When Does This Break Down”):
“You may know from experience that tangent space normal mapping will fail if the author’s UV map is zero or one dimensional (that is, the author mapped a triangle in the mesh to a line or point on the UV map).”
This seems to be the the problem in my case. The modeler sent me a model with a UV map and it worked.
Do you think that you could add a way to detect this and do some logging so we can know when this is the problem?
@SntsDev wrote
This
MeshStandardMaterialwithnormalMapworks for me on iOS 10 and macOS 10.12: http://threejs.org/examples/webgl_materials_displacementmap.html.