Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Mindfulness Personal Development Personal Transformation Life Purpose Meditation Coaching Neuroscience
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ Unreal Engine Blueprints 2D Game Development Blender
30-Day Money-Back Guarantee

This course includes:

  • 4.5 hours on-demand video
  • 4 articles
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
Development Game Development Unity

Learn Unity Shaders from Scratch

A complete guide to Unity ShaderLab and the Cg Shading Language
Rating: 4.7 out of 54.7 (44 ratings)
494 students
Created by Nicholas Lever
Last updated 6/2020
English
English [Auto]
30-Day Money-Back Guarantee

What you'll learn

  • The mysteries of writing Unity shaders
  • You will be gently introduced to how to approach the problem of creating a custom shader.
  • You will learn the full details of the Cg shader language.
  • You will learn to use the Surface Shader syntax to add custom shaders on top of Unity lighting.
  • You will start with simple unlit 2D shaders and work up to advanced effects such as volumetric shaders and clipping.

Course content

12 sections • 56 lectures • 4h 26m total length

  • Preview03:20
  • Preview02:53
  • Parallel Processing
    01:48
  • Cg is not C#
    04:42
  • What have you learned?
    4 questions

  • Preview09:28
  • Working with vectors in Cg
    07:12
  • Using the Properties section
    06:03
  • Blending colours
    08:22
  • Using step and smoothstep
    04:13
  • What have you learned?
    5 questions

  • Preview02:21
  • Drawing a square
    10:10
  • Moving our shape
    04:13
  • Moving the square with the mouse
    04:25
  • Moving the shape over time
    02:59
  • Rotating the square
    08:06
  • Changing the rotation centre and scaling
    06:28
  • Tiling
    03:33
  • Drawing circles
    05:57
  • Drawing lines
    07:07
  • Combining lines
    08:38
  • Showing a polygon
    05:30
  • Creating a brick pattern
    08:12
  • What have you learned?
    7 questions

  • #pragmas
    00:12
  • What’s all that noise?
    03:30
  • Using noise to create a fire shader
    06:06
  • Using noise to create wood and marble
    04:02
  • What have you learned?
    3 questions

  • A simple use of a texture image
    07:18
  • Preview04:56
  • Blend between textures.
    05:22
  • What have you learned?
    3 questions

  • Turning a box into a sphere
    04:11
  • Using the Unity lighting - Lambert
    04:16
  • Creating a ball of lava
    05:13
  • What have you learned?
    3 questions

  • ShaderLab Surface Shaders - an introduction
    05:01
  • Bump mapping
    03:33
  • Preview02:09
  • Environment mapping
    02:55
  • Adding a bump map to a reflective surface
    03:13
  • Blinn Phong lighting
    04:31
  • Custom lighting
    06:28
  • Standard lighting
    04:23
  • Adding a vertex function to a surface shader
    03:05
  • What have you learned?
    7 questions

  • Lighting in a vertex, fragment shader
    05:33
  • A position location shader
    04:29
  • Drawing a cross on the floor
    00:19
  • Preview06:23
  • Using the stencil buffer
    06:27
  • Clipping the output
    03:07
  • What have you learned?
    5 questions

  • Alpha transparency in a surface shader
    03:51
  • Space Pirate turns to glass
    07:30

  • Volumetric Rendering
    06:32
  • Using textures in the render
    05:55

Requirements

  • All you need is a copy of Unity, freely available for students.
  • A knowledge of the basics of using Unity is assumed, this is readily available by many online tutorials.
  • No knowledge of shaders is assumed.
  • A knowledge of a programming language would help but is not assumed.

Description

In this course we're going to look at Unity ShaderLab and the Cg shading language to create amazing shaders.

Maybe you are

  • a developer struggling to bring to life a particular game feature because it needs a custom shader.

  • a developer who always wanted to create custom shaders but was too scared to start.

  • a developer wanting to add some custom post-processing effects to your 3d renders.

Unity ShaderLab is how you create custom shaders. It comes in 3 flavours, fixed function, vertex-fragment and surface shaders. We won't be looking at the fixed function route in this course as it is effectively a legacy option and you want to learn modern best practice. The code syntax is based on the C language, but fear not, we will assume you have literally no knowledge of this language at all and we will, as the course title states, learn this from scratch. A shader uses the GPU ( the Graphics Processing Unit) to handle multiple programs at the same time, so it is unbelievably fast.

We will start from really simple examples and progress slowly through each stage of developing a custom shader. You will be able to play with the shader code using Visual Studio, or another code editor if you prefer. You can experiment with different values to see the impact it has on the end result.

Unity shaders are split into vertex shaders and fragment shaders and we will focus initially on the fragment shader, working essentially in a 2d environment. With dozens of shaders in the course resources you will learn the language in gentle stages. Before moving on to use Unity's surface shader syntax to easily include complex lighting.

Once you're comfortable with simple shaders we will cover advanced effects such as tessellation, transparency, using the stencil buffer and post-processing.

Creating your own shaders means understanding the Cg language and that is the aim of the course. You could search for a suitable shader on ShaderToy or ShaderFrog and then try to adapt the code. But without knowing the language you're going to find that difficult to do. To really be effective you need to know about the Cg language, shaping functions, tiling and lighting calculations. To do this you will need to follow along with the course and complete the many challenges suggested. At the end you will then be able to create any shader that you can imagine.

As usual there is a 30 day money back guarantee. So you have nothing to lose. Let's get shading today!


What students say about the course

"Great course. Took this as a refresher to get back into shaders. Everything you need is provided. Both starting scenes for each lecture and also completed ones if you get stuck with code errors. Nice learning curve. Everything is well explained. No long boring slideshows. Also plenty of challenges, which I like and find very useful in assisting your learning. Very clear audio and code. So no problems following along and plenty to take in. Also Nicholas is very helpful with your Q&A’s. Highly recommended."


and what students say about my GLSL Shader course

"A great course! Methodical, step by step explanations not only of the GLSL but also of the general theory behind shaders, usable with any shader system. Essential if you are into computer graphics or generative art. Thank you!"

"I've tried to pick up shaders in the past but found it quite difficult. Unlike other resources I've found, this course was the course that finally helped me get a much better grasp of glsl. It is well structured and very informative. I would recommend it to anyone looking to pick up glsl."

Who this course is for:

  • Unity developers who need to go beyond the shaders available on the platform.
  • Developers keen to learn the Cg shading language for other development platforms such as Unreal.

Instructor

Nicholas Lever
Game developer
Nicholas Lever
  • 4.4 Instructor Rating
  • 1,123 Reviews
  • 5,925 Students
  • 8 Courses

After getting a degree in Graphic Design, I started work in 1980 as a cartoon animator. Buying a Sinclair ZX81 back in 1982 was the start of a migration to a full time programmer. The ZX81 was quickly swapped for the Sinclair Spectrum, a Z80 processor and a massive 48K of ram made this a much better computer to develop games. I developed a few games using Sinclair Basic and then Assembler. The Spectrum was swapped for a Commodore Amiga and I developed more games in the shareware market, moving to using C. At this stage it was essentially a hobby. Paid work was still animated commercials. 

I finally bought a PC in the early nineties and completed an Open University degree in Maths and Computing. I created a sprite library ActiveX control and authored my first book, aimed at getting designers into programming. In the mid nineties along came Flash and the company I was now running, Catalyst Pictures, became known for creating games. 

Since then the majority of my working life has been creating games, first in Flash and Director, as Director published the first widely available 3D library that would run in a browser using a plugin. 

In recent years game development has involved using HTML5 and Canvas. Using both custom code and various libraries. A particular preference is to use the latest version of Adobe Flash, now called Animate that exports to the Javascript library Createjs. 

I've worked for the BBC. Johnson and Johnson. Deloitte, Mars Corporation and many other blue chip clients. The company I've run for over 30 years has won a number of awards and been nominated for a BAFTA twice, the UK equivalent to the Oscar. 

Over the last 20 years I have been struck by just how difficult it has been to get good developers and have decided to do something about this rather than just complain. I run a CodeClub for kids 9-13 years old and I'm developing a number of courses for Udemy hoping to inspire and educate new developers. Most of my courses involve real-time 3d either using the popular Open Source library Three.JS or Unity. I'm currently having a lot of fun developing WebXR games and playing with my Oculus Quest.

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.