This is a visual shader addon for Godot 4.2+. This adds the HeightBlend node to the visual shader editor. This node lets you blend between two heightmaps or use a single heightmap with a mask.
You can blend between two heightmaps. In first example below, the first heightmap is a rock and the second one is dirt. Using the Height Offset
parameter you can place the dirt in the crevices of the rock. You can mask the blended texture, as seen in the second example.
Two heightmap blend | With mask |
---|---|
You can use a single heightmap. In this case you want to leave the Height 2 value at 0.5.
You can adjust the Contrast
and Height Offset
parameters to get desired results.
Extract the zip file and copy the folder to your project. You'll need to restart the editor for the node to appear in visual shader. Alternatively, you can make a new gdscript file and copy the code.