Skip to content

Shaders that I previously worked on and can share their source code. (No assets, only code)

License

Notifications You must be signed in to change notification settings

V0xel0/Unity_Shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity_Shaders

Shaders that I worked on. (No assets, only code)

Water & Waves

Water shaders optimized for some mobile usage. Supports reflections through reflection probes and refractions. Toggleable options to tailor performance/quality. Ability to modulate colors through gradient and also water muddines & crisspness. Ocean shader is based on few gerstner waves.

Water

20231009_142213.mp4

UI Controls

image

Waves

20231009_142135.mp4

Smoother

Shader + script that allows creations of semi-interactive mud, snow, skidmarks etc. Works by writing to red-channel of intermediate texture, raycasting and converting the hit to UV space and then using that data to move vertices, alter normal map and albedo. Featuring options to change the strength, size, ray distance, and also natural "regeneration" or further "degeneration" of mesh in time. Vertex movement can be disabled if our platform is computation starved.

Typical behaviour

standard.mp4

Regeneration effect

regen.mp4

Painter

Allows automatic smooth applying of second texture based on direction vector and normal vectors of the mesh. Useful for dirt, snow etc.

Typical Usage

painter_basic.mp4

Changing direction

painter_direction.mp4

Outglow

Applying inner or outer glow to a mesh, useful for fast fake lights, special effects, marking/selecting objects by hilighting them.

20231009_142627.mp4

Fake PBR

This was created to approximate unity standard PBR shader but taking some shortcuts in terms of being PBR "correct" in order to gain on efficiency on really old, mobile platforms. It allows easy extenbility to more lights and customization.
image On the left Unity standard on the right the Fake one image On the right Unity standard on the left the Fake one image Support of standard PBR game meshes (normal, albedo, metallic, roughness maps) image

Toon

Typical toon shader with outline rendered by pushing backfaces, allows adding additonal rims and steps for achieving different effects.

image

About

Shaders that I previously worked on and can share their source code. (No assets, only code)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published