Search Issue Tracker
Fixed in 5.4.0
[Regression][5.4][RTP] RTP Terrain shader rendering is broken after upgrading project to 5.4
Download Relief Terrain Package (https://www.assetstore.unity3d.com/en/#!/content/5664) from A$.
Steps to repro:
1. Open Unity 5.3.3f1;
2. Create new project and scene;
3. Import downloaded previously Relief Terrain Package;
4. Create terrain gameobject (GameObject -> 3D Object -> Terrain);
5. Go to 'Paint Texture' tab of Terrain component;
6. Add 4 different terrain-layer textures (e.g. Grass, Rocks, Ground, Snow);
7. Add Relief Terrain Engine component (Add Component -> Relief Terrain -> Engine-Terrain or Mesh);
8. Select ‘RTP_LODmanager’ gameobject in the Hierarchy panel;
9. In the Inspector scroll down and click ‘Recompile shaders for given feature set’ button;
10. Wait until shaders recompile;
11. Notice that after recompilation terrain shader is rendered stably without any errors (expected behaviour);
12. Save scene and project;
13. Close Unity;
14. Open Unity 5.4.0b8;
15. Open the same project and scene;
16. Notice that after the project is opened in 5.4.0b8 shader error is displayed:
Shader error in 'Relief Pack/ReliefTerrain-FirstPass': maximum ps_4_0 sampler register index (16) exceeded at Assets/ReliefPack/Shaders/ReliefTerrain/RTP_Base.cginc(664) (on glcore) Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF RTP_PM_SHADINGPlatform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP UNITY_TEXTURE_ALPHASPLIT_ALLOWED.
Also notice, that shader rendering terrain is broken (see attached actual.png and gif video).
17. Repeat steps 8-10 (shader recompilation).
Terrain shader is partially broken - texture is visible when viewpoint is far from terrain, however when scrolling in, it all goes purple (see attached gif video).
Regression introduced in Unity 5.4.0b8.
- Terrain shader should be rendered normally without fallbacks after upgrading project to 5.4.
- No errors should be shown after upgrading/recompiling shaders in 5.4.
Expected behaviour could be found in 5.3.3f1.
- Reproducible in: 5.4.0b8;
- Not reproducible in 5.3.3f1;
- Reproducible on: OSX 10.11.3 and Windows 10;
- This bug could be package related;
- Opening project again on 5.3.3f1 after having received broken shader rendering in 5.4.0b8 leads to broken shader in 5.3 as well.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [IL2CPP][Android] Incorrect symbol length/symbols returned with "AndroidJavaClass"and "AndroidJavaProxy" on Android < 5.1.1
- Animating the alpha channel of a color in a material causes the RGB channels to be reset to 0
- [Mobile] TouchScreenKeyboardType is missing DecimalPad
- Memory leak in Scene Memory/RenderTexture when Scene View is active and 'Animated Materials' + 'Post Processings' toggles are on
- Ctrl + F should start search in PackageManager