Search Issue Tracker
By Design
Votes
0
Found in
2019.1.0b2
2019.1.0b5
2019.2.0a3
Issue ID
1144260
Regression
No
TerrainPaintUtility faulty calculations when using RenderTexture as a Source
How to reproduce:
1. Open the "SampleScene" in the attached "Unity Bug report.zip" Project
2. Enter Play Mode
3. Observe the "Terrain" GameObject in Scene View
4. In the Terrain Settings check and uncheck the "Draw Instanced" Checkbox several times to see the difference
Expected Behavior: The RenderTexture, Terrain Heights, Terrain Heights with Draw Instanced values are equal
Actual Behavior: The RenderTexture, Terrain Heights, Terrain Heights with Draw Instanced values are all different
Reproducible with: 2019.1.0f1, 2019.2.0a13
Note: Could not test with 2018.3 and 2017.4 because of the compilation errors
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Maximising Game view window on one display makes black bars appear on another display
- Creating a 3D Object when using 2 monitors and 2 Game View Windows on different monitors the created 3D Object only appears on one of them
- Character spacing value is not applied when using a specific font asset
- [Android][IL2CPP] Player crashes on __memcpy_aarch64_simd+276 when invoking native code via a plugin on some ARM64 Android devices
- [Android]Resources fail to load when the AAB build contains a large Addressables Bundle
Resolution Note:
Yes, this is unfortunate, but by design.
The full valid range of a heightmap is [0, 0.5].
It's obviously not how it should ideally work, but this behavior stems from the old data format and trying to keep everything backwards compatible with existing Terrain data.
Your shader needs to multiply your height outputs by 0.5, and clamp them to the [0, 0.5] range.