There are many innocuous things you'll do in gamedev which create garbage, which must be cleaned up by Unity. Learn how to manage memory to avoid costly GC spikes.
There are many innocuous things you'll do in gamedev which create garbage, which must be cleaned up by Unity. Learn how to manage memory to avoid costly GC spikes.
We can implement a texture lighting ramp for finer control over our lighting cutoff points and use different stencil IDs to prevent strange outline overlap issues.
Outlines are a great way to emphasize the toon aesthetic, and we can add inverted hull outlines in a second pass.
Normal maps let us add finer detailing on an object's surface and change the way lighting interacts with the object. Fresnel lighting helps objects stand out in a scene.
By introducing a hard cutoff point in the lighting ramp, we can render cel-shaded lighting, which makes objects look cartoony.
Unity provides ways of accessing information about lights in the scene, and we can use the vector dot product to calculate the amount of illumination on the surface.
We use simplified models to approximate the way real light behaves. By splitting light into ambient, diffuse, and specular components, we can calculate light efficiently.
The cel-shading technique was used to stylize the look of many games such as Wind Waker and Jet Set Rario. This series of articles will explore how it works.
In this article, we'll explore several shader concepts, including space transformations, structs, textures, shaders functions, and color spaces.
The Kuwahara filter removes noise from images, but it can also be used stylistically for an oil painting-like effect.
Retro consoles had a limited resolution and color palette, which we can recreate in Unity by downsampling and posterizing the screen.
The Sobel filter is great at detecting edges, and we can use its output to outline objects in the scene or make everything look like it's neon-lit.
Box blur and Gaussian blur are two popular blurring algorithms. We can make these blurs significantly more efficient by using two passes, because they are linearly separable.
With the depth buffer, we can color objects lighter or darker based on how far they are from the camera for a simple silhouette effect.
One of the simplest image effects involves basic color mapping. Greyscale filters map from RGB to a single value, while sepia tone uses a matrix of values for a new RGB color.