Godot Engine users can now achieve high-fidelity surface blending similar to Unreal Engine’s workflow through a new custom shader implementation. Developed by technical artist and developer Bastien Genbrugge, the "Height-Based Blending" solution allows for seamless transitions between materials using height maps, effectively masking textures based on depth rather than simple alpha transparency.
Technical Implementation of Height-Based Blending
The system utilizes a custom shader approach within Godot 4.x to calculate the intersection of two distinct materials. According to Bastien Genbrugge’s documentation, the shader takes two sets of textures—each containing albedo, normal, and height maps—and uses the height data to determine the transition point.

Unlike standard linear interpolation (lerp), which creates a uniform fade, this method uses a contrast-based height mask. This ensures that the "taller" pixels of the top material remain visible while the "lower" pixels are replaced by the base material, creating a natural layering effect. This technique is a staple in AAA production pipelines, where it is frequently used to blend terrain textures, such as gravel transitioning into grass, or to simulate wear on architectural assets.
Comparison: Godot vs. Unreal Engine Material Workflows
In Unreal Engine, material blending is a native feature supported by the Material Editor’s "Layered Materials" and "Height Lerp" nodes. These systems are highly optimized for the engine’s deferred rendering pipeline.
In contrast, Godot’s standard material system does not include a built-in, one-click height-blending node for complex texture layering. Developers previously relied on manually constructing shader graphs or using simple vertex painting to achieve similar visuals. Genbrugge’s implementation bridges this gap by providing a reusable shader snippet that approximates the behavior of Unreal’s workflow, allowing Godot users to:
- Reduce Texture Seams: By using height maps, the transition between materials follows the contours of the textures, hiding the harsh edges common in standard alpha blending.
- Optimize Performance: The shader performs the blending calculation on the GPU, maintaining efficiency for real-time applications.
- Enhance Visual Fidelity: It enables more complex material interactions, such as wetness or moss accumulation, without requiring unique, baked textures for every possible surface combination.
Integration and Requirements
To implement this in a project, developers must be using Godot 4.x, as the shader relies on the updated Visual Shader or GDShader syntax introduced in that version. The implementation requires two materials with matching texture properties. Users must define a "blending contrast" parameter within the shader, which controls the sharpness of the transition.

While this solution provides an advanced workflow for individual assets, developers should note that it is designed primarily for mesh-based material blending. For large-scale terrain, Godot’s native Terrain3D plugin or other specialized terrain shaders may offer better performance and ease of use. This custom shader is currently available as an open-source resource, allowing for modifications to support additional features like vertex color modulation or triplanar mapping.