JamesTKhan / Mundus

A 3D world/level editor built with Java, Kotlin & libGDX.
Apache License 2.0
157 stars 19 forks source link

Triplanar Texture mapping for Terrain #151

Closed antzGames closed 1 year ago

antzGames commented 1 year ago

Is your feature request related to a problem? Please describe. I am sure JTK knows about Triplanar texture mapping. It is to solve terrain texture mapping issues like this:

image

Describe the solution you'd like I know performance will be impacted as you have to draw 3+ times, but you can include a toggle in the editor/runtime so you can turn it off or on.

Additional context

Detailed explanation of Triplanar terrain mapping here: https://gamedevelopment.tutsplus.com/articles/use-tri-planar-texture-mapping-for-better-terrain--gamedev-13821

So this enhancement could be part of https://github.com/JamesTKhan/Mundus/issues/127 enhancement.

JamesTKhan commented 1 year ago

Thanks for adding this. I do have some code shelved to add triplanar mapping to mundus already but I need to return to it and finish it.

Definitely can be expensive with the additonal texture lookups but it's worth it in my opinion.

Especially if the terrain texture also has normal textures, then both get sampled multiple times.