Shader Development from Scratch for Unity with Cg

Learn to program the graphics pipeline in Unity for creating unique visual surfaces for game objects.

4.69 (3305 reviews)
Udemy
platform
English
language
Game Development
category
instructor
20,225
students
10.5 hours
content
Aug 2022
last update
$89.99
regular price

What you will learn

Use Unity Shaderlab to create their own shader effects with CG/HLSL.

Apply their knowledge of simple mathematics to change the visual surface of virtual objects.

Work with mesh vertices and textures to develop unique rendering effects.

Demonstrate a knowledge of the graphics pipeline and apply it to problem solving shading issues.

Description

Now Updated for Unity 2017 to 2019

This course presents a comprehensive guide to programming with Cg and High Level Shader Language in Unity's Shaderlab, to create your own visual surface effects for colouring and lighting game objects. It covers the mathematics of light and surfaces and steps you through the recreation of some of the most popular shaders. Many computer graphics concepts will be presented to help you understand the graphics pipeline and provide you with an essential toolkit of rendering knowledge, that will have you developing your own transparent, animated and texturised shaders in no time.

In this course, Penny teaches all the invaluable skills you will require to program the computer graphics pipeline in Unity from scratch using her internationally acclaimed teaching style and knowledge from over 25 years working with games and graphics.  But hold on tight as you'll be taken on a journey across the computer graphics realm as it is taught to post-graduate university students. Through detailed descriptions and hands-on workshops examining all you need to know about rendering queues, vector mathematics, graphics buffers, colour theory, 3D meshes, texture mapping, lighting models and much more.

Learn how to program and work with:

  • variables and packed arrays

  • meshes, vertices and UVs

  • the mathematics for working with objects in 3D and 2D spaces

  • a variety of lighting models from creating flat shaded objects to highly reflective shiny surfaces

  • bump maps for adding extra depth and dimension to surface textures

  • special effects such as holographic, scrolling textures and surface deformations

  • the variety of graphics buffers used in the rendering pipeline

  • forward and deferred lighting

  • surface, vertex and fragment shaders written in CG/HLSL

  • volumetric rendering

Contents and Overview

After diving right in and creating your very first shader from scratch, we will begin the lessons by examining how 3D models are structured and how that is used within shader code to colour and display the surface in computer graphics. You'll discover all the properties of a shader and how they can be controlled in code and via values fed in through Unity's Inspector.

Following this, we will examine a variety of lighting models and how lights and surface textures can influence the final look of a render. Included here, an overview of the buffers involved in the rendering queue will be given with practical examples for creating special effects that require more than one draw call. Students will also be exposed to the power of vector mathematics and especially the dot product and its role in creating beautiful effects such as outlines, rim lighting and holograms. In addition, issues surrounding transparency and blending will be discussed along with many practical hands-on workshops in which students can flex their newfound skills to interrogate the code they write for better understanding.

The next section brings together all the skills learned throughout together, to develop some of the more popular complex shaders including animated plasma and animated water with waves.

Finally volumetric shaders are covered in which you will follow along to create special effects such as fake geometry, fog and clouds.

What students are saying about this course:

  • This is the best course I've ever taken. It is perfect for me. I worked for 15 years in feature animation. A large part of my career was spent developing shaders for a proprietary renderer. This course has already helped me to bring the value of my previous experience into Unity.

  • Best shader course I've come across. There are enough and more tutorials on youtube to teach you how to develop your own shaders, but nothing falls into the class of Penny's tutorials. They are clear and to the point. Really happy about this one.

  • Wow! Thank you so much! If there were 10 stars - this course would deserve it. Going from absolutely knowing nothing about Shader writing to have a profund understanding about it.....

  • I wanted to let you know that I just finished your shader course and thought it was fantastic. It was a pleasure to take the course and finally get a grasp on a topic that seemed so foreign to me not so long ago. Your teaching style and personality really worked for me and made learning a breeze!

Content

Introduction

Welcome
Join the H3D Student Community
FAQs
Help! Why can't I see my shaders correctly?
The Rendering Pipeline
Your First Surface Shader
Challenge
Crash Course in Vector Mathematics

Shader Essentials

Variables and Packed Arrays
The Anatomy of a Mesh and Shader Input
Shader Properties
Properties Challenge 1
Properties Challenge 2
Properties Challenge 3
Properties Challenge 4

Illuminating Surfaces

Lambert & Lighting
Normal Mapping
Bumped Diffuse Challenge
Visualising Normals
Illumination Models
Bumped Environments
Bumped Environments Challenge
Buffers and Queues

The Dot Product

The Dot Product
Quiz
Rim Lighting
Logical Cutoffs
Challenge

Lighting

Lighting Models
Blinn-Phong Lighting & Surface Output
Physically-Based Rendering
Challenge 1
Challenge 2
Writing Your Own Lighting Model
Challenge 3
Challenge 4

Passes & Blending

The Alpha Channel
Holograms
Blending
Leaves and Culling
Blending Two Images
Stencil Buffer
Advanced Stencils

Writing Vertex and Fragment Shaders

The Anatomy of a Vertex/Fragment Shader
Colouring by Vertices and Fragments
Material Use
Lighting
Shadows
Challenge 1
Challenge 2

Advanced Effects

Vertex Extruding
Outlining
Glass
Waves
Scrolling Textures
Challenge 1
Plasma
Challenge 2

Volumetric Rendering

Ray Marching
More on Ray Marching
Spherical Fog
Rendering Fog Density P1
Rendering Fog Density P2
Volumetric Clouds Value Noise
Programming Value Noise P1
Programming Value Noise P2
Programming Value Noise P3
Integrating Colours and Depth
Enhanced Noise
Clouds On Camera P1
Clouds On Camera P2
Clouds On Camera P3
Clouds On Camera P4
References

Final Words

Where to Now?

Appendices

Appendix A - CG Function List
Appendix B - Shader Cheat Sheet
Appendix C - Credits and Extra Resources

Screenshots

Shader Development from Scratch for Unity with Cg - Screenshot_01Shader Development from Scratch for Unity with Cg - Screenshot_02Shader Development from Scratch for Unity with Cg - Screenshot_03Shader Development from Scratch for Unity with Cg - Screenshot_04

Reviews

Cara
September 15, 2023
It is an exceptional match! I am an experienced coder, and this goes fast enough for me, without being too complicated for a newer learner to comprehend (there are no 'assumption' gaps). Well explained, and so cool!
Andre
July 14, 2023
I've learned a lot of things already, there is so much information, presented in a concise way. I loved the lecture explaining normal maps!
JONATHAN
July 12, 2023
In the beginning the topics were explained well, though the shaders were mostly just from the Unity documentation. I would have liked to see some more unique effects. In the later sections there was no explaining whatsoever. It was just code, code, code and the advice to go in and figure stuff out by changing it. So it went downhill in quality quiet a lot.
Johannes
June 9, 2023
This is a great course. I bought this course for multiple reasons, and all of them were addressed. I am: 1. practicing to write HLSL code 2. learning Unity ShaderLab and Cg work 3. refreshing my knowledge about models for render pipelines Thank you for the great material Dr. Penny de Byl!
Terry
June 2, 2023
Wonderful course, concepts are explained very clear by the insturctor, as a beginner to unity shader, this is totally what I need.
Levashan
April 26, 2023
Love this course, made some pretty cool looking shaders and got some pretty good base knowledge of shaders programming, definitely recommend this course to anyone who does not have any knowledge on making shader. Its a great introduction to making shaders.
Daniel
April 5, 2023
It's unfortunately poor and resources are tragic and the knowledge itself is really basic, barely touching more advanced stuff. The teacher should provide all necessary resources as models and textures. Answers for challenges should be provided as a separate video discussing how and why something is done evew if it's the simpliest stuff. The intro takes way to long and seeing it in every video is exhausting. In Normal Mapping lesson Penny is using Standard shader instead of the one that she had written. The result is quite different.
Guido
March 29, 2023
This course is amazing! Not only does it introduce all the concepts required to build amazing shaders, there's also a good amount of theory and history. All in a package that has a great didactic structure. Highly recommended!
Alvaro
January 30, 2023
Great course; I have learned a lot. Well-paced and hands-on on the spot. Easy to reproduce, tinker and expand upon.
Benjamin
January 23, 2023
Very excited to learn formulas and some shading techniques. The last part was very confusing for me and a bit frustrating to see how less I know. But yeah was a great course
Andrew
January 18, 2023
I love this course. That said I am a little lost with truly understanding how the code in the CGPROGRAM is executed. The IN and the inout and out seem a bit of a mystery to me.
Treyton
December 6, 2022
This course is great! I do wish custom lighting models, transparent rendering, and blending were covered in more detail but this course is fantastic, full of clarity, and very good at challenging you to push yourself.
Dimitri
November 21, 2022
It's a great course for me to understand how shaders work. It explains how the pixels are calculated, how the light can be involved into the calculation and using of dot function for it, How blending between different colours can be done together with alpha/transparent channel. Using of time function to get moving textures and even vertices for waves. In general speaking, i enjoyed very much and would like to see more details about how data or vectors are converted from vertex shader and passing to fragment shader. Especially from one space into another and changes are somehow related with last 2 components z and w. Volumetric rendering blown my mind :D. I liked to see how it works and would like to see it explained in step by step what happens at which step. I think that could already by a new course. Before watching it i would recommend to see Mathematics for Computer Games Development where you will get information about operating with vectors and after that you will enjoy that course even more. Thanks to Penny for creating such a good course!
Jacob
August 28, 2022
I had a bad feeling about this course from the moment we were given a block of code on the screen and told to just "write it out" without any prior explanation to anything going on or given any reasoning to what we're writing. We go from writing a surface shader, to suddenly being given several math lessons with again, no explanation. Then once it's back to actually writing more code, you get several terms shoved in your face with definitions afterwards instead of actually APPLYING them and cementing them into your knowledge. In conclusion, too much copy/paste work, not enough explanation given to anything or hands-on work.
Jeff
August 16, 2022
So far it's been really helpful re-learning the basics and the explanations are clear and easy to follow.

Charts

Price

Shader Development from Scratch for Unity with Cg - Price chart

Rating

Shader Development from Scratch for Unity with Cg - Ratings chart

Enrollment distribution

Shader Development from Scratch for Unity with Cg - Distribution chart

Related Topics

1382482
udemy ID
10/6/2017
course created date
11/20/2019
course indexed date
Bot
course submited by