top of page
Procedural Rock Shader
Platform: PC
Duration: 3 Weeks
Tools: Unreal Engine 5
- Solo Project
​Overview:
This is a fully procedural rock shader built with material nodes, designed to achieve a realistic style. It features detail normal mapping along with dynamic snow coverage, moss growth, and rainwater effects on the surface.
Materials:

Material Parameters:

​MossCoverage: Controls the coverage area of vegetation on the surface
​RockScale: Controls the uv scale of rock basemap
Global Parameters:

Centralized all weather-related parameters in a Material Parameter Collection, enabling global access and control across shaders.
​RainDropIntensity: Controls the intensity of raindrop formation on the rock surface
​RainDripIntensity: Controls the intensity of raindrip formation along the rock’s vertical faces
​SnowCoverage: Controls the coverage area of snow on the surface
​RoughnessScale: Controls the global scale of the roughness map
RockMaterial:
This is the final material assigned to the mesh.

MF_RockBase
This material function controls the rock’s core parameters, including color, UVs, normal, roughness, and ambient occlusion. The output from the moss coverage calculation is fed into the color output, while the outputs from the raindrop and raindrip calculations are applied to both the normal and roughness channels.

The UV coordinates are multiplied by the Object Scale to ensure that texture detail remains consistent and sharp regardless of mesh scaling.

MF_RockDetail
In this material function, the UVs of a micro normal map are scaled by a factor of 12 and blended into the normal map and color, ensuring that fine surface detail remains visible at close viewing distances without becoming blurred.

MF_Snow
This material function controls the snow coverage on the rock. It multiplies sunlight-facing normals with a screen-space sparkle texture to simulate shimmering highlights.

Using the upward-facing component of the vertex normal in world space as a mask, ensuring snow always accumulates on the top-facing surfaces in world space.

MF_RainDrop
In this material function, A raindrop texture is sampled to isolate static small droplets and dynamic large drops, which are then blended and applied to the top-facing surfaces in world space.

MF_RainDrip
This material function simulates the effect of rainwater running down the surface of an object.

The mask constrains raindrip effects to the side-facing surfaces of the object in world space.

It projects raindrip textures in world space so they always align with the -Z direction and maintain consistent scale across objects.

bottom of page