Problems can often be solved in several ways. We can draw grass with basic meshes, geometry shaders, procedural rendering, billboards, terrains, and impostors.
Problems can often be solved in several ways. We can draw grass with basic meshes, geometry shaders, procedural rendering, billboards, terrains, and impostors.
With halftone, we can posterize a smooth shading gradient into a stylistic dot-matrix pattern with differently-sized dots.
Combining Shader Graph and VFX Graph can yield more powerful visuals than using one tool alone.
We can use the stencil buffer to mask out portions of the screen and only render objects in specific layers in those portions for 'impossible' visuals.
The PS1 couldn't perform perspective-correct texture mapping, resulting in wobbly textures at some angles. We can do the same in HLSL with the noperspective keyword.
Decals are now supported in URP natively, but it's still useful to know how you can make your own decal Shader Graph using depth buffer tricks.
Using noise to produce random vectors, we can calculate lighting based on the main light direction and add tiny sparkles to the surface of an object.
We can use a UV offset based on the distance between a pixel and a ripple origin point to distort a painting texture.
Geometry and tessellation shaders are capable of drawing thousands of grass blades on top of a ground mesh. Based on a fantastic article by Roystan.
Part of the process of making shaders is figuring out how to break down a large effect into smaller steps.
Ever wanted to have private variables in code which are exposed in the Unity inspector? Let's talk about serialization.
For a quick refraction effect, we can use a flow map to offset the Scene Color node.
The enchantment effect seen in Minecraft involves scrolling a secondary transparent texture as an overlay on the base texture.
To make the two-frame wobble effect from scribbl.io, it's as easy as adding a random noise UV offset with a modulo clock.
Duplicating a mesh, inverting its faces, and moving them along the normal vector then drawing with a block color is probably the most widely-used outline method in games.