Skip to content
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

Patch to fix terrain textures #25

Open
GartzenDeHaes opened this issue Dec 9, 2023 · 1 comment
Open

Patch to fix terrain textures #25

GartzenDeHaes opened this issue Dec 9, 2023 · 1 comment

Comments

@GartzenDeHaes
Copy link

GartzenDeHaes commented Dec 9, 2023

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.

@demonixis
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants