Tutorials

Exploring shaders and materials in Unity 2018.x to develop scalable mobile games [video]

2 min read

Shaders are simple programs used for graphics and effects, generally designed to run on GPU. These are specialized instruction sets than programming languages like HLSL, CG, or GLSL.

On the other hand, materials define how a surface should be rendered, by including references to the textures it uses, tiling information, color tints, and more. The available options for a material depend on which shader the material is using.

Types of Shaders

Surface Shaders: Surface Shaders in Unity is a code generation approach that makes it easier to write lit shaders than using low-level vertex/pixel shader programs. While these are widely used for modern games thanks to their robustness, they are expensive.

Vertex shaders: These perform operations on each vertex, and are very fast.

Fragment shaders: These shaders operate at the per-triangle level.

In the following video, Raymundo Barrer outlines the basic difference and relationship between shaders and materials. He also explains the material-shader connection and what a simplified 3D rendering pipeline looks like.

For more hands-on experience with relevant code samples for porting a game to mobile, adding downloadable content, and to track your game’s performance, do visit Raymundo’s course titled Hands-On Unity 2018.x Game Development for Mobile [Video]

About the author

Raymundo Barrera is a software engineer who has spent the better part of the last decade working on various serious, entertainment, and educational projects in Unity. He is currently working in education tech as director of mobile engineering at a well-known education company. You can connect with him on LinkedIn or on his personal website.

Read Next

Getting started with ML agents in Unity [Tutorial]

Working with shaders in C++ to create 3D games

Multi-agents environments and adversarial self-play in Unity [Tutorial]

Savia Lobo

A Data science fanatic. Loves to be updated with the tech happenings around the globe. Loves singing and composing songs. Believes in putting the art in smart.

Share
Published by
Savia Lobo

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago