This is a shader library used for unity shader coding, pointing to different shader effects found from various sources. Several library topics may become public in the future. This project is mainly for personal study and lack the knowledge of code management(i.e., comprehensive comment / user guide) and formal name formatting.
The following showcase pictures and knowledge network are organized in my understanding of different categories of shaders, some references and cites will be listed. But most of the content will be covered in my personal markdown notes.
See https://www.youtube.com/watch?v=aasnYKazO2Q for my TA/Rendering showreel and other bits of progress of this repository.
- Reference - Genshin Impact 渊下宫 / Zone Zero / Kejiro's PPS Light Streak
- Distance / Position / UV based Dissolve Factor calculation
- Dissolve Edge and Color
- Noise Dissolve Edge fluctuation
- Runtime implementation
- TBC - Magic: The Gathering / Legends of Runeterra look
- Noise based vertex displacement (high frequency and low frequency)
- World / Object / Screen Position based scan line (thin and thick)
- Fresnel Inner Outline
- Depth based edge detection and noise based variation
- Animation Process Mask map usage
- Screen Space UV Quad Formation and 2D Noise Texture distortion
- 3D Noise based shinning glitter
- Fresnel + Noise achieving flowing inner outline
- TBC - Journey / Witness desert look
- TBC
- TBC
- Noise-based displacement variation
- Distance based / Position based / Anime Goosebump Mockup
- Post Processing Light Shaft
- Occlusion Texture generation (only skybox kept)
- Radial image blur achieving light shaft leaking effect
- Noise offset turning pattern into noise
- Animated Speed Lines
- Good reference - Apex: Legends;
- SSAO
- World Position Rebuild
- Not implemented yet.
- Portal
- Mooncage
- Genshin Impact Style Cel Shading, Lightmap guided, Color ramp controlled (lacks face ramp control and hair specular map usage, didn't use screen space rim light).
- Outline pass - Screen Space thickness, View space normal extrusion
- PBR Based Cel Shading
- Diffuse, Specular falloff and ramp control
- Matcap shading
- NRP Shading
- Multiple ramp area control
- Diffuse, Specular, Shadow area control (for various artistic styles)
- Specular intensity control (the smoothstep function breaks the energy conservation, thus need to tweak the value to achieve proper appearance)
- Halftone step (UV Space / Screen Space)
- Todo: Anisotropic Specular Calculation
- Todo: UE approach of spherical-shape light / line-shape light (representative point)
- Todo: RBF area light approach
- Todo: HDRP shader understanding
- Todo: Fake SSS with thickness map
- Todo: Human Skin SSS rendering
- Reference
- Sun and Moon SDF based Rendering
- Texture / 3D Noise based Star rendering
- Texture Cloud Rendering
- Todo: multiple sampling achieving cloud thickness feeling
- Sky dome color ramp control
- Todo: add atmospheric scattering colorization
- Fake volumetric layer cloud - See: https://github.com/Zoroiscrying/UnityInteractableWater-Grass-Wind_URP
- Todo: Ray-marched volumetric cloud
References
- Wind Simulation in God of War - YouTube
- graphics.cs.cmu.edu/nsp/course/15-464/Fall09/papers/StamFluidforGames.pdf
- Interactive Wind and Vegetation in 'God of War' - YouTube
- Between Tech and Art: The Vegetation of Horizon Zero Dawn - YouTube
Showcase Pictures
(Work in progress on artistic showcases and dynamic vegetations...)
Global Wind 3D Scene Debug
- Based on
DrawMeshInstancedIndirect
Global Wind 2D Texture Slice Debug
- Based on Unity Post Processing and Custom PPS Render Pass
Wind Contributor Objects
- Shapes - Box, Cylinder, Sphere
- Velocity Calculation Type - Fixed, Point-based, Axis-Distance-Based
Wind Receivers (On Progress)
- Planning
- Vegetation - Grass, Vines, Shrubs
- Plant - Tree
- Cloth - Non-physically-correct
- Fur / Hair
References
- https://www.slideshare.net/BenjaminGlatzel/volumetric-lighting-for-many-lights-in-lords-of-the-fallen
- Physically Based and Unified Volumetric Rendering in Frostbite
- GitHub - ArthurBrussee/Vapor at master
- Volumetric lights - Alexandre Pestana
- https://bartwronski.files.wordpress.com/2014/08/bwronski_volumetric_fog_siggraph2014.pdf
Showcase Pictures
World-Space Ray-Marching Volumetric Lighting
- World Space Camera Ray-march, Single Scattering Calculation
- Down-sample and up-sample reducing GPU cost
- Noise offset turning pattern into noise
- Bilateral Blur keeping sharp edge
- Gaussian Blur reducing light shaft edge artifact
Post-Processing Radial-Blur Volumetric Lighting
- TODO: Last of Us 2 volumetric lighting
- Frustum Voxel 3D scattering & decay texture / integration texture
- Various light shape's precalculated integration result
- Shadow map implementation for various light shapes
- Down-sampling and TAA support for volumetric lighting result
- Useful code reference
- Unity Adam showcase volumetric lighting
- Unity HDRP Volumetric lighting implementation
- Todo: Tomb Raider: Rise solution
- Todo: Do some research ^^.
- Last of Us 2 screen particles approach.
References
References
- https://www.youtube.com/watch?v=MKX45_riWQA GDC talk by Sean Feeley
- Todo: Horizon: Zero Dawn volumetric cloud solution
- Stylized Water / Ocean Shader
- Todo: Jacobian water foam calculation
- Todo: RT + Particle system water foam and interaction (stylized)
- Todo: Underwater Post Process / Midwater look through effect (Maybe use stencil + post processing / world space near-camera water surface calculation + post processing)
- Depth and ramp based water colorization
- Gerstner / Sine wave and normal re-calculation
- Edge foam
- Water reflection and refraction
- Todo: FFT-based Realistic Ocean Shaders (Praise Horizon: Forbidden West and Assassin's Creed: Odyssey)
- Todo: Various Ocean simulations (Heightfield water simulation especially)
- Used in:
- Stylized Water / Ocean Shader
References
References
- Catlike coding: https://catlikecoding.com/unity/tutorials/rendering/part-20/
References
References