https://github.com/rorydungan/unityendlessterrain
https://github.com/rorydungan/unityendlessterrain
displacement shader terrain unity3d vertex
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rorydungan/unityendlessterrain
- Owner: RoryDungan
- License: mit
- Created: 2018-04-28T12:18:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T01:30:21.000Z (almost 7 years ago)
- Last Synced: 2025-03-17T08:13:37.750Z (about 1 month ago)
- Topics: displacement, shader, terrain, unity3d, vertex
- Language: C#
- Size: 1.82 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity Endless Terrain
Terrain displacement shader using perlin noise.
Based on code I wrote for a game jam that generated terrain meshes procedurally on the CPU. Procedurally building geometry in Unity can be quite slow so I ported the code to HLSL. It can run either as a vertex displacement shader (using the "Terrain" shader), or output to a render texture which is useful for if you need the data in CPU memory as well (say, for generating collision meshes).
## Future plans
- Upgrade the shader to work with proper pixel lighting instead of being vertex-lit.
- Support blending between multiple textures based on height or introduce a concept of "biomes".
- Write a system for loading/unloading chunks around the camera to simulate infinite terrain.
- Should recycle chunk objects to avoid overhead of spawning/destroying objects
- Use tesselation shader to blend smoothly between LODs.
- Support deferred rendering as well as forward.