Skip to content

Shaders created in unity for learning and experimenting purposes

Notifications You must be signed in to change notification settings

etopuz/ShaderNotes

Repository files navigation

Shaders And CG Notes On Unity

Experiments and notes based on different sources. This page shows the effects and key points of shaders created. Also for each experiment, there is a link to see full codes. Shaders are created in cg for now.

Sources

Assets

Many thanks to the creators of these valuable sources.

Experiments

Experiment_002 Stencil Shader

Hole Mechanic From Donut County

StencilMask Shader

StencilBlocked Shader

See Full Stencil Shader Codes

Experiment_003 Kaleidoscope Effect

Kaleidoscope Effect

Kaleidoscope Shader

See Full Kaleidoscope Effect Shader Codes

Note: Unity_Rotate_Degrees_float is a function written by Unity included in Shader Graph. The function rotates the value of input UV around a reference point defined by the input Center by the amount of input rotation. See in Shader Graph Manual

Experiment_004 Zoom Effect

Zoom Effect Kaleidoscope Shader
See Full Zoom Effect Shader Codes

Experiment_005 Health Bar

Experiment_005.1 Simple Health Bar

Simple Health Bar Simple Health Bar Shader

Experiment_005.2 Fancy Health Bar

Fancy Health Bar Fancy Health Bar Shader

Note: My implementation for roundness and border is overcomplex. It can be easily made with SDF. Please watch this part from Freya Holmér's Shader Video if you'd like to see a clean implementation.

See Full Healthbar Shader Codes

Experiment_006 Sprite Outline Effect

Sprite Outline Sprite Outline Shader
See Full Sprite Outline Shader Codes