Rendering Essentials in Unity, for Software Engineers

Eyas
10 min readAug 1, 2022
The TV room in 2013 game “Gone Home”, made with Unity. CC BY-SA 3.0

While most Software Engineers interested in game development will be most excited about the programming aspect of making a game, you’ll need some familiarity with graphics, animation, and sound to be successful. This is especially true if you’re trying to work solo. While a wealth of assets and resources are available in the Asset Store, there’s a decent amount you still need to know to execute well when putting these resources together. In this installment, we’ll discuss Rendering, Render Pipelines, and Lighting in Unity.

This is Unity for Software Engineers, a series for those seeking an accelerated introduction to game development in Unity.

Shaders & Materials

Shaders are programs that help transform a mesh (made out of vertices and faces) into a 3D rendered image. Shaders are parameterized with any number of properties, such as a texture image representing the surface’s appearance, normal maps representing finer bumps on the mesh, and much more. The shader code you write determines what kind of properties it receives if any.

In Unity, each Rendering Pipeline (discussed below) comes with its own set of standard shaders. All rendering pipelines include a “Simple Lit” shader as the most common shader, which helps render an object affected by lighting. In all pipelines, the Simple Lit variation takes in a base color or texture, a normal map, a smoothness map, and physically-based rendering inputs like metallic and specular values as properties.1

A Material is effectively an instance of a Shader. It is an Asset that uses a specific shader and defines all relevant input properties on that Shader.

The inspector page of three different materials using the Universal Render Pipeline’s Simple Lit shader.
The inspector page of three different materials using the Universal Render Pipeline’s Simple Lit shader.

In the figure above, we see three materials:

  • The first material uses a custom base texture giving the shape its characteristic color.
  • The first and second materials use a custom normal map texture giving the shape a bumpy appearance.
  • The second and third materials use a simple white color as their base color.
  • The second and third…

--

--

Eyas

Software Engineer living in Brooklyn, NY. MIT Computer Science S.B. ’13, M.Eng. ‘14. From Amman, Jordan. Interested in politics, current affairs, and technology