
Explore creating Unity shaders from basics to advanced techniques using HLSL and CG, covering fragment and vertex shaders, surface shaders, textures, lighting, post-processing, and shader graph workflows.
Explore how Unity renders triangles by positioning vertices in world space and projecting them to a 2d screen, then coloring pixels via vertex and fragment shaders, with z-buffer depth handling.
Explore how parallel processing powers Unity shaders, comparing CPU and GPU roles. See how many independent vertices and pixels are computed simultaneously for fast graphics.
Explore how Cg differs from C sharp, with typing and semicolon rules. Define variables using int, half, fixed, float, and bool, create vectors, and learn function overloading for Cg.
Learn to build a simple unlit shader by creating a new scene, adding a quad, and implementing vertex and fragment shaders that return a solid red color.
Explore CGI vectors in Unity shaders by creating type 2–4 vectors, converting types, passing values from Unity to shaders, and using swizzling, time uniforms, and trig to animate color.
Learn how the Unity properties panel feeds a color property into a Cg shader, then blend color a and color b over time using delta and swizzle.
Discover how vertex shader UV values interpolate in the fragment shader to blend two colors across a quad in Unity, using a V2F data structure.
Learn to create hard color edges and soft transitions in Unity shaders using step and smoothstep, adjusting edge values and eye position to produce yellow blocks and circles.
Draw a circle in a shader using the step function on the distance from the center with radius 0.25 and position x y, and color inside with fixed yellow value.
Learn how to draw a square in Unity shaders by building a custom rect function that tests a fragment against a centered rectangle using the step function, returning 1 inside.
Move the square around the screen by adjusting its center and size, and render a yellow square using the rect method and a fixed color vector. Try a two-squares challenge.
Move a shader-driven square in Unity by mapping mouse position to texture coordinates via a raycast on a quad, then pass the UVs to the shader at runtime.
Move a square in a circle using time, sine, and cosine in a Unity shader, and update the center with time and radius to control the orbit.
Learn to rotate a square in Unity shaders using a two-dimensional rotation matrix, rotating about the square's center by subtracting and adding the center, driven by time.
Rotate around a chosen anchor by adding a fourth parameter to the rect function and using an anchor point, then build rotation and scaling matrices for time-based transformations.
Switch uv coordinates for the quad to 0–1 range and use a tile count with the frac function to create multiple squares, teaching uv space and tiling in Unity shaders.
Learn to draw circles in Unity shaders by testing pixel distance from a center, using radius-based circle tests, and adding soft edges and outlines with smoothstep.
Learn to draw lines in Unity shaders from scratch, using a line test with smoothstep and edge thickness. Apply UV coordinates and coordinate space conversion to render diagonal lines.
Combine multiple lines and circles in Unity shaders to create a rotating sweep around the screen center, using UV coordinates, color addition, dot products, and gradient tricks.
Learn to render a polygon using a six-parameter polygon function, calculating test point, center, radius, and sides with rotation and trigonometric math.
Create a brick pattern in Unity shaders using horizontal and offset rows with UV coordinates and mortar logic. Color with break and multicolor options, and add noise for realism.
Discover how noise adds naturalism to Unity shaders using random functions and Ken Perlin's smoothing to create varied textures.
Move noise in the y direction with the time uniform, layer three noise textures at scales, then blend red and yellow colors using alpha and tiling for a fire shader.
Leverage noise functions, including the pearling technique, to create wood and marble textures in Unity shaders, tweaking ring scale, contrast, and color to control look and patterns.
Explore texturing in shaders by applying an image to a quad, sampling with tex2D using UV coordinates, and experimenting with flipping, rotating, and grayscaling the texture.
Explore how to create a ripple effect on an image by selecting different texels from a texture, driven by time-based parameters and center-based coordinates.
Blend between two textures in Unity shaders using a custom material and a UI button to drive a time-based fade with start time and delta.
Turn a box into a sphere with a vertex shader in Unity, blending between the model position and a radius-controlled sphere, animated by delta time to breathe.
Learn Lambert lighting in Unity by converting normals to world space, calculating lighting with the dot product of world normal and directional light, and ensuring lighting values stay nonnegative.
Learn to build a lava bowl in Unity using a vertex shader driven by noise, turbulence, and P noise, then color via a fragment shader and small texture.
Explore shader lab surface shaders by implementing a surface function with input and output structs, using lambert lighting to combine albedo, texture, and UVs for a textured character.
Learn how bump mapping uses a texture to define normals and offset lighting via the fragment shader, sampling a normal map's rgb channels.
Explore fresnel shading to add a rim light in Unity, using rim color, width, and power, driven by the dot product of the surface normal and view direction.
Learn how to implement environment mapping in Unity by using cube maps to reflect surroundings, control reflection strength, and integrate the vertex world reflection vector in a surface shader.
Add a bump map to a reflective surface in Unity shaders, enabling per-pixel reflections with bump map UVs, normal unpacking, and updated input and serve functions.
Explore Blinn-Phong lighting and how specular highlights arise from surface gloss and specular power. See how Unity surface shaders utilize Lambert and Blinn-Phong models to control shininess and reflections.
Create a simple Lambert lighting shader using a lighting function with the normal and light direction dot product and max clamp, then explore ramp lighting and an outline pass.
Learn Unity shaders from scratch explores standard lighting with a physically based shader, adding smoothness, metallic, bump maps, rim lighting, and instancing to optimize rendering.
Add a vertex function to a Unity surface shader. Move vertices along their normals using a user adjustable extrusion amount exposed as a property.
Learn to implement shadows in a vertex fragment shader for Unity lighting, adding Lambert lighting, ambient color, directional light calculations, and multi-compile shadow variants.
Implement a position location shader that highlights the clicked walk target with a white circle by using world position, a radius, and a circle color in the fragment shader.
Master tessellation in Unity by subdividing triangles and displacing interior vertices along interpolated normals to create a smooth Phong displacement.
Learn to use the stencil buffer in Unity to reveal a house interior by rendering a quad first, writing stencil ref 1, and drawing only where the stencil passes.
Learn how to clip shader output in Unity using clip, frac, and world position y to reveal or hide a character with a time based reveal effect.
Explore alpha transparency in Unity surface shaders by using the alpha channel of textures, adjusting render queues, alpha fade, and shadow passes to create stained-glass window effects.
Learn to turn a textured mesh into glass using a vertex and fragment shader, grab pass, and an environment map. Tune transparency, reflection, and blending with bump maps and normals.
Explore volumetric rendering in Unity shaders by ray casting to render a colored sphere inside a cube, using ray marching, clipping, and camera-space calculations to achieve volumes.
Master ray marching in Unity shaders by sampling a 12 by 12 texture atlas of 144 smoke textures, and accumulate alpha to render volumetric clouds.
For the last 5 years I have been working with the team at Unity to create learning resources for them including e-books. Using this insider knowledge I bring you the best Unity Shader course you can find. All updated for Unity 6. Including URP shaders and Shader Graph.
With Unity 6 the Universal Render Pipeline (URP) is now the default pipeline. This course shows you how to create shaders for URP either using code or if you are not a coder using Shader Graph. Putting you right at the cutting edge.
In this course we're going to look at using HLSL 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.
an artist wanting to create shaders without learning to code.
HLSL 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 HLSL 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 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."
"The information presented in this course is fantastic. The tutor has a great personality, and I can’t stress enough how enjoyable he makes this course."
"It is fantastic. You need a little bit of math to understand it better but with attention and repetition it will be easy to anyone. Thanks a lot professor!"
"Exceptional good structured step by step course. Background knowledge is provided on spot when necessary. Nik has a special encouraging attitude and he is fun to listen to. Thanks!"
"The best shaders instructor I've seen so far. His lessons are clear, practical, and the way he talks keeps the student motivated with the right amount of humour but without losing focus! I'm glad I've found this course."
"I would say that this was the best course I have bought on Udemy so far."
"If you’re looking to dive deep into Unity shaders, this course is a goldmine. Nicholas walks you through the fundamentals and pushes you to try new things, which makes learning feel much more rewarding."