World-Space UV Mapping

From Shader Forge Wiki
Jump to: navigation, search
Planar mapping along Y-axis
Texture stays relative to world space origin when moving the object

World-Space UV Mapping is a technique for mapping textures in world-space. In its most common approach a simple planar mapping is used. The advantage of this is that you can use the shader on a terrain or any other procedurally created mesh, for example, and the textures would map without requiring explicit UV coordinates provided by the mesh itself. As the name implies though the UV coordinates get transformed into world-space and will stay relative to the world-space origin. Thus moving the textured object may result in unintended visuals. Also this technique is prone to perceptible texture stretching the more vertex normals of the textured mesh point away from the projection axis.