Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

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

Save for later
  • 2 min read
  • 23 Oct 2018

article-image
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.

https://www.youtube.com/watch?v=MEp4asS9v_g&list=PLTgRMOcmRb3NeQU6M8muq7Qev8e8nMfsY&index=4

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.

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]

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime