Search Issue Tracker

Fixed in 2017.4.X

Votes

0

Found in

5.3.3f1

Issue ID

778096

Regression

No

[StandardShader] Parallax incorrect in some scale/batching situations, due to lack of normalize() in shader

Shaders

-

Normals/tangents in the vertex shader are not guaranteed to be normalized, and are not normalized in some dynamic batching situations, for example. Looks like parallax mapping related code in Standard shader does not expect that.

How to reproduce:

1. Open attached project
2. Open scene testscene.unity
3. Select the material Parallax Mapping.mat
4. Modify its Height Map property
- Note that the height maps adjust properly in the scene/game view
5. Enable the plane_fbx_VertexColorsWetness (1) gameobject in the hierarchy
6. Repeat from step 3
- Note that when the Height Map is modified, the height map appears to be stretched-out
- Ddding normalize(v.normal) and normalize(v.tangent) in shader program solves it

- Reproduced in Version 5.4.0b9 (04b47bfe5580), Version 5.3.3p3 (1c43f6d3d3c3), Version 5.2.4f1 (98095704e6fe)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.