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.
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.
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.
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.
We can use a UV offset based on the distance between a pixel and a ripple origin point to distort a painting texture.
Part of the process of making shaders is figuring out how to break down a large effect into smaller steps.
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.
Shader Graph comes with over 200 nodes, and in this mammoth article, I'll explain how each one works with examples.
HLSL shader code in URP works slightly differently to the built-in pipeline. If you've never worked with shader code before, this is a good place to start!
Snow only falls and stays on the upper surfaces of objects, so we can run the dot product with the up-vector to find which surfaces should have snow applied.
With alpha clipping and raycasts, we can find out which walls obscure a specific object and cut out holes to keep the object visible.