-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tile texture goes pitch black when y-axis scaling is an extremely low value #42
Comments
Appears to be caused by internal floating point precision issues. As an alternative workaround, use an unlit material. |
@brnkhy Think we could just set a minimum y scale value? |
I just bumped into potentially this issue ... but only on Windows 10, Unity 5.6.2f1. Pitch black. On MacOS with Unity 5.6.1f1 this issue doesn't happen, although I did notice that at small tiles (say 0.5 TileSize), lighting doesn't quite work and I get a dim terrain. Unlit is a workaround for now. |
So far I've only come across that issue on one of my Android devices using Hope I haven't forgotten anything but these are the only changes needed for Does not occur on
results in: If I change If I change the shader back to |
This is almost certainly related to a floating point precision issue, specifically in how lighting is calculated when the tiles are scaled so far down. Another workaround is to increase the tile size when using lower zoom levels (this results in less transform scaling). |
Fixed: 032466b |
This especially happens if you load the world in low zoom levels like 1 to 5. Root world object y-axis scale goes extremely low and unless TileSize is increased proportionally (i.e. using default 100), Unity cannot render the tile texture.
It renders if world scale y-axis is set to 1 (breaks heights of features&terrain) or TileSize increased to a much bigger number (like 1000 or 100000 depending on zoom level).
The text was updated successfully, but these errors were encountered: