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

Terrain Layering Feature #129

Closed
wants to merge 8 commits into from
Closed

Terrain Layering Feature #129

wants to merge 8 commits into from

Conversation

JamesTKhan
Copy link
Owner

@JamesTKhan JamesTKhan commented Nov 9, 2022

Work in Progress feature to add auto-texture terrain layers based on height and slope.

TODO:

  • Update Shader
  • Update UI
  • Persist layers
  • New InvalidateShader event to invalidate current shaders forcing them to be rebuild
  • Some way to constrain sliders?
  • Normal maps
  • Test HTML, Android, Windows, Linux

@JamesTKhan JamesTKhan linked an issue Nov 9, 2022 that may be closed by this pull request
@JamesTKhan
Copy link
Owner Author

Unfortunately this PR is stalled due to GWT support/limitations on texture units for a shader. Still thinking of ideas to resolve this.

# Conflicts:
#	editor/src/main/com/mbrlabs/mundus/editor/ui/modules/inspector/components/terrain/TerrainSmoothTab.kt
@JamesTKhan
Copy link
Owner Author

Taking another look at this PR. I think TextureArray will allow us to resolve the issue, but the problem is TextureArray is not available on WebGL1. The WebGL2 PR for libGDX was recently merged libgdx/libgdx#7037

This feature may have to wait until we upgrade to a libGDX version that has the WebGL2 feature unless I think of another way to reduce the texture units for terrains. From my understanding you can do multiple passes but that will hurt performance.

# Conflicts:
#	commons/src/main/com/mbrlabs/mundus/commons/shaders/terrain.uber.frag.glsl
@JamesTKhan
Copy link
Owner Author

Closing this PR, not because I am giving up on this feature but because the amount of changes happening for terrain chunks feature will likely mean this PR needs a do-over from a fresh start and the verbiage TerrainLayer will need rethinking as Terrain Chunks introduces a different type of meaning for Terrain Layer.

@JamesTKhan JamesTKhan closed this Oct 19, 2023
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

Successfully merging this pull request may close these issues.

Auto-Texture Terrain Layer feature
1 participant