RAFAEL DAVID JOSÉ

Toon Shader

SOURCE CODE

DESCRIPTION

This project explores toon shading techniques within Unity, employing Shader Graph and HLSL for comprehensive lighting implementation. The shader creates a stylized cartoon-like appearance through custom lighting models, ramp-based shading, rim lighting effects, and outline rendering. The implementation combines multiple visual effects to achieve a cohesive toon aesthetic suitable for stylized 3D applications.

SCREENSHOTS

Screenshot Screenshot Screenshot

MY ROLE & CONTRIBUTION

As the sole developer, I implemented a complete toon shading system using Unity Shader Graph and HLSL. My responsibilities included developing custom diffuse lighting using the Lambert model with shadow integration, creating specular lighting calculations with smoothness controls, and implementing ramp-based shading for hard color transitions. I designed rim lighting effects for edge highlighting, developed painted specular effects using texture modulation, and created outline rendering using depth texture manipulation. I also handled comprehensive documentation of all shader techniques and optimization for real-time performance.

CORE CONCEPTS

This project demonstrates shader programming concepts including custom lighting models, shadow mapping integration, and stylized rendering techniques. It explores the balance between realistic lighting calculations and artistic visual styles, demonstrating how mathematical lighting models can be modified to achieve non-photorealistic rendering effects.

TECHNICAL ASPECTS

The Toon Shader was developed in Unity using Shader Graph and HLSL programming. It implements custom diffuse lighting using Lambert model with GetMainLight() integration, specular lighting with exponential smoothness calculations, and ramp-based color quantization for cartoon-style transitions. The shader includes rim lighting using Fresnel effects, painted specular using HSV color space manipulation, and outline rendering through depth texture analysis with camera distance compensation.

COURSE: "Graphic Computing" – Bachelor in Videogames, Universidade Lusófona (2º year, 1º semester)

PLATFORM: Unity Engine - Universal Render Pipeline (URP)

DEVELOPMENT TIME: ~1 Month

TEAM SIZE: 1 developer

TECHNOLOGIES USED:

💎
🏆 ACHIEVEMENT UNLOCKED!
"Portfolio Explorer"