I looked into the
code for the mod and there were two problems.
Firstly, it had a bunch of dependencies on the old postprocessing, which just isn't there anymore. This kept the mod from functioning at all.
Commenting the lines in question out seemed to get it working. These are the changes I made in DistantTerrain.cs:
Code: Select all
Line 9: using UnityEngine.PostProcessing;
Line 83: private PostProcessingBehaviour postProcessingBehaviour;
Line 253: PostProcessingBehaviour stackedCameraPostProcessingBehaviour = null;
Line 355: postProcessingBehaviour = Camera.main.GetComponent<PostProcessingBehaviour>();
Line 713 : if (postProcessingBehaviour != null)
Line 714: {
Line 715: stackedCameraPostProcessingBehaviour = goStackedCamera.AddComponent<PostProcessingBehaviour>();
Line 716: stackedCameraPostProcessingBehaviour.profile = postProcessingBehaviour.profile;
Line 717: }
to
Code: Select all
Line 9: using UnityEngine.Rendering.PostProcessing;
Line 83: //private PostProcessingBehaviour postProcessingBehaviour;
Line 253: //PostProcessingBehaviour stackedCameraPostProcessingBehaviour = null;
Line 355: //postProcessingBehaviour = Camera.main.GetComponent<PostProcessingBehaviour>();
Line 713 : //if (postProcessingBehaviour != null)
Line 714: //{
Line 715: //stackedCameraPostProcessingBehaviour = goStackedCamera.AddComponent<PostProcessingBehaviour>();
Line 716: //stackedCameraPostProcessingBehaviour.profile = postProcessingBehaviour.profile;
Line 717: //}
Unfortunately there was one very apparent issue:
The textures of the distant terrain are all black!
That got me thinking it's related to the change from gamma to linear colourspace, which was messing with the Interesting Terrains mod. So I looked at Interkarma's solution to that problem, and changed the following line from:
Code: Select all
Line 555: textureTerrainInfoTileMap = new Texture2D(terrainInfoTileMapDim, terrainInfoTileMapDim, TextureFormat.RGBA32, false);
to
Code: Select all
Line 555: textureTerrainInfoTileMap = new Texture2D(terrainInfoTileMapDim, terrainInfoTileMapDim, TextureFormat.ARGB32, false, true);
and now it works!
If Nystul is okay with it, I can compile and release it as an update. If not, you can do the changes and compile it yourself.