Gist 8dde5bfea433aa824444246c47f0d46f
✓ Published0🌍 Public
Aandybak
Last edited Jun 11, 2019
Created on Jun 11, 2019
A custom Unity shader renders double-sided foliage with a spherical normal trick, replacing each vertex’s normal with a direction from the model origin to the vertex. It combines alpha-cutout transparency with Fresnel-based edge fading, using `clip` to discard pixels below a cutoff. The shader applies Lambert diffuse lighting from `_WorldSpaceLightPos0` plus ambient light via `ShadeSH9`, while normals are offset by a vector property. The material is intended for tree models, as noted in the author’s comments, and supports alpha testing in the `TransparentCutout` render queue.
AI-generated description