← All resources

ciro-unity GitHub - BotW-ToonShader CustomLighting.hlsl

Auto-discovered

Library / Codebase Intermediate

ciro-unity

Visit resource ↗

Description

This link is CustomLighting.hlsl in Ciro Continisio's BotW-ToonShader GitHub repo, part of a Unity URP Shader Graph Breath of the Wild-style toon study. The include supplies runtime lighting helpers for Shader Graph Custom Function nodes.

MainLight returns direction, color, distance attenuation, and shadow attenuation via URP shadow coordinates and shadow maps. DirectSpecular adds remapped smoothness and highlights; AdditionalLights sums Lambert diffuse and specular from extra pixel lights.

It suits intermediate URP Shader Graph developers using custom HLSL and URP keywords for shadows, additional lights, lightmaps, and screen-space occlusion.

Sibling subgraphs in Assets/Shaders connect these calls to the toon graphs in the README and Unite Copenhagen 2019 Shader Graph talks.

The include is a compact URP custom-lighting reference in stylized-shader roundups and Cyanilux gist links.