Website powered by

HLSL Rock+Grass Shader

This shader blends two textures (like rock and grass) based on the surface's world-space direction and angle, using dot product math and a Fresnel effect for smoother transitions. I customized it from a tutorial by adding tint controls and fresnel-based blending to simulate natural material buildup like moss or dust. It taught me how to use normals, direction vectors, and procedural blending in ShaderLab.

Unity Engine view of material with varying tint, offset, tiling, and direction

Unity Engine view of material with varying tint, offset, tiling, and direction

Closeup view of material applied on sphere in Unity

Closeup view of material applied on sphere in Unity