TES3Unity icon indicating copy to clipboard operation
TES3Unity copied to clipboard

Patch to fix terrain textures

Open GartzenDeHaes opened this issue 2 years ago • 1 comments

Hi, to get the terrain textures to render, change CellManager.cs lines 586- 591 to

splat = new TerrainLayer();
splat.diffuseTexture = texture;
splat.smoothness = 0.075f;
splat.metallic = 0.05f;
splat.specular = Color.black;
splat.maskMapTexture = TextureManager.CreateMaskTexture(splat.metallic, 1, 0, splat.smoothness);

The key part is that the green channel of the mask texture is AO (Ambient Occlusion). Setting it to zero makes the terrain dark.

GartzenDeHaes avatar Dec 09 '23 02:12 GartzenDeHaes

Thanks a lot, don't hesitate to do a PR otherwise I can update the code myself

demonixis avatar Nov 06 '24 09:11 demonixis