Out now!
2D SHADER
DEVELOPMENT
PROCEDURAL TEXTURE MANIPULATION
Make your games unique in a world full of lookalikes by leveraging the power of shaders.
Procedural Texture Manipulation is the third in a series of 4 books and will teach you techniques you can use to draw and modify textures with code.
Table of Contents
-
Introduction to the series
- Motivation for the series
- I use Unity, why should I bother learning shader programming at all?
- Who are these books for?
- I need help! What can I do?
- Downloading the source code for the book
- Introduction to Procedural Texture Manipulation
-
Drawing with math: Lines, Functions, and Rectangles
-
The basics
- Step
- Smoothstep
- Plotting functions
-
Basic shapes
- Line
- Rectangles
- Circle
- Triangles and n-side polygons
-
Transformations
- Scaling
- Translation
- Rotating
- Composition of basic shapes
- Combining shapes
- Subtracting shapes
- Masking
- Composition
-
Exercise 1
- Add thickness to
plot
- Add softness to
plot
- Create a rotated soft rectangle
- Add thickness to
-
The basics
-
Image deformations
-
Basic
uv
deformations- Starting point
- Translate
- Scale (Zoom)
- Stretch
- Translate overflow fix
- Rotate
- Deforming with trigonometric functions
- Chroma aberration, playing with RGBA channels
-
Tampering with the resolution
quantization - Resolution change
-
Using masks
-
Hand-rolled masks
- Masks using RGB channels
-
Hand-rolled masks
- Exercise 2
-
Basic
-
Animating deformations
- Using masks in animation
- Easing
- Exercise 3
- Where to go now
- Acknowledgements
- Credits
-
Exercise 1 Solution
-
Add thickness to
plot
- Add softness to
plot
- Create a rotated soft rectangle
- Add softness to
-
Add thickness to
- Exercise 2 Solution
-
Exercise 3 Solution
- Flag pole
- Static Crowie
- Animating Crowie
-
Appendix I: Gallery of Shaping (Easing) Functions
- Step and Smoothstep
fmod
(Modulo, or remainder)- Fractional part
- Ceil / Floor
- Power of
n
clamp
-
Appendix II: Signed Distance Fields
- Circle
- Square
- Composition of Distance Fields
-
Appendix III: Polar Coordinates
- Going back to cartesian coordinates
- Appendix IV: Quantization