Skip to main content
100%

Gist a3b086e4ec021188c08a4afa990e988e

✓ Published0🌍 Public
Aandybak
Last edited Mar 4, 2021
Created on Mar 4, 2021

This example shows a Unity shader that applies triplanar texture mapping to surfaces, blending three planar projections based on each fragment’s local normal direction. The shader, written in HLSL with the Standard Surface shader model, samples a main texture, normal map, and occlusion map across the X, Y, and Z axes, then weights the results by the normalized absolute normal components. It supports transparency, metallic, glossiness, and occlusion parameters, and relies on Unity’s `surf` and `vert` functions. The code is adapted from keijiro’s StandardTriplanar shader and runs in the Unity engine.

AI-generated description

Similar vizzes