We may earn an affiliate commission when you visit our partners.
Penny de Byl, Nicholas Lever, and Penny Holistic3D

By learning to create Compute Shaders, you will put yourself at the cutting edge of Unity development. Unlike a traditional shader, you can use a Compute Shader to handle any data manipulation problem, where having dozens (or even hundreds) of threads running simultaneously causing a bottleneck in your game to run many, many times faster. In this course you will start from small steps, learning the basics of compute shaders. First, we look at passing data from the CPU to the GPU using buffers. Then we’ll look at using these buffers in our calculations. Once you have this initial grounding, you learn how to use these techniques to create blisteringly-fast post-processing filters. You can use Compute Shaders to handle particle effects and flocking calculations. In the course, you'll create a flock of thousands of birds where each bird flaps its wings in sync with its speed through the air. Divide and conquer is the way, with Compute Shaders. By using hundreds of threads running simultaneously, we develop a GPU Physics engine that can handle thousands of tumbling chess pieces. Compute Shaders are ideal for handling the orientation of grass blades as an avatar moves through grass. The challenging subject of fluids (both 2D and 3D) are covered in the course and you'll see how much this computationally-intensive field benefits from Compute Shaders.

Read more

By learning to create Compute Shaders, you will put yourself at the cutting edge of Unity development. Unlike a traditional shader, you can use a Compute Shader to handle any data manipulation problem, where having dozens (or even hundreds) of threads running simultaneously causing a bottleneck in your game to run many, many times faster. In this course you will start from small steps, learning the basics of compute shaders. First, we look at passing data from the CPU to the GPU using buffers. Then we’ll look at using these buffers in our calculations. Once you have this initial grounding, you learn how to use these techniques to create blisteringly-fast post-processing filters. You can use Compute Shaders to handle particle effects and flocking calculations. In the course, you'll create a flock of thousands of birds where each bird flaps its wings in sync with its speed through the air. Divide and conquer is the way, with Compute Shaders. By using hundreds of threads running simultaneously, we develop a GPU Physics engine that can handle thousands of tumbling chess pieces. Compute Shaders are ideal for handling the orientation of grass blades as an avatar moves through grass. The challenging subject of fluids (both 2D and 3D) are covered in the course and you'll see how much this computationally-intensive field benefits from Compute Shaders.

The resources for the course are presented as a code-along version and a complete version and include over 30 different examples. Unity Compute Shaders provides the ideal platform to learn how to handle complex problems in your games. Flocking calculations using the 3 key rules of Separation, Cohesion, and Alignment are covered in detail. The physics calculations to handle fast collision detection and the forces involved are included (both theoretically and practically). Smoothed Particle Hydrodynamics is a technique for calculating fluid simulations. We'll take you through it from the foundation level.

If you're working with Unity, you need to understand how to use Compute Shaders to ensure your game has the best performance. After all, why let the GPU sit idle while the CPU is working overtime? You'll see massive performance improvements if you switch some tasks to the GPU and handle them with a Compute Shader.

This course uses Unity 2019.4 and is Windows and Mac compatible.

Student feedback

"This course is simply amazing. I always wanted to learn those topics and finally got some incredible resources. Thank you a lot. Btw I loved the didactic. The default scenes and challenges are really helping me to stick with the course without getting frustrated. The topics covered are very difficult but you made it in a way where we can really get step by step and at the same time seeing incredible things on screen. ""This course is an intensive, well explained, understanding on how compute shaders work, impressive results and explanations""Amazing course - followed up Penny De Byls CG Shader course with this one and they dovetail excellently. Nicholas does a great job with some interesting projects and great concepts - loved the section on fluid simulation.""I have just started the Compute Shaders course from Holistic 3D. Loving the course, and I am finding it super easy to understand. Been looking for a decent tutorial for ages, and this is definitely the one I have been looking for. ""Great tutorial, knowledge is condensed and easy to acquire. I always wanted to learn programming shaders and GPU computing, so this course is something that fits my needs perfectly. ""This course excels at filling in the blanks from my self-taught knowledge and understanding of compute shaders. The explanations are concise yet full, all the while aiding the connection of the basics to form a solid foundation. "

"Course is super informative with great pacing (on the fast side) and plenty of challenges along the way. The challenges are why I am giving the 5-star rating. These tend to require some thought, but are solvable using what we have learned, and for my taste, just the right level of difficulty."

"This course is absolutely a must for any 3D graphics developer. It is the best resource I have seen online without a doubt. Nicholas is an amazing instructor and he is able to explain really complicated concepts such as Navier-Stokes equations is very simple terms. I would give 10 stars it if was possible. Way beyond my expectations and I will watch it again several times as references. Thank you Mr. Lever for your outstanding work in teaching incredible content with very accessible language. Please more physics simulation :)"

"This is absolutely worth your time and money if you want to learn about compute shaders.  Nik Lever takes the time to explain the relevant code line by line and is clearly knowledgeable about the subject. His jovial British spirit will encourage even the most jaded souls to hone their knowledge as he presents coding challenges that grow incrementally in complexity as the course progresses. Will be checking out whatever course he creates next."

"I have been struggling with a bottleneck in my project and learning about compute shaders gave me a whole new perspective. The instructor knows what he's talking about. This is a very good course on the subject."

What others are saying about Nik's courses:

  • Very rich content and impressive didactics. Very good to learn from someone who has mastered the subject and knows how to teach.

  • Nik's style of teaching made me understand everything very intuitively and I'm so comfortable with shaders now.

  • I like Nik's courses, I understand in the way he explains. Great content.

Enroll now

What's inside

Syllabus

Introduction

How to contact us

FAQs
Welcome to the course
Read more
Your first compute shader
Reviewing your first compute shader
Multiple Kernels
Challenge: Use a compute shader to draw a single square in the middle of a Quad
What have you learned?
Learn the basics of creating, data handling and calling simple 2D compute shaders.
Passing data to the shader
The joy of buffers
Orbiting stars
Using noise in the shader
Mesh deformation
Challenge: Draw a polygon filled with noise.
Setting up a buffer-based particle effect
Setup and write image filters that are applied to the rendered output
Setting up the rendering pipeline
A simple blur effect
Night vision lenses
A HUD overlay - part 1
A HUD overlay - part 2
A star glow effect: vertex-fragment shaders - part 1
A star glow effect: vertex-fragment shaders - part 2
Challenge: Create a sepia effect to the renderer output
Use the GPU to handle particle effects
Adding a mesh to each particle
A simple flocking example
Using instanced meshes in the flock
Using a skinned mesh in the flock
Challenge: Swish that tail
Harness the GPU to handle physics
Starting simple, bouncing balls
A bit of theory
Initializing the data
GPU Physics Compute Shader - part 1
GPU Physics Compute Shader - part 2
Voxelization of a mesh
Challenge: tumbling chess pieces
Handle duplication, animation and deformation of a mesh to simulate grass.
Using Blender to create a single grass clump
Using instancing to cover a surface with grass
Bending blades of grass
Grass on an uneven surface
Trampling the grass
Challenge: Use noise to bend grass clumps
2d and 3d fluid simulations
Navier-Stokes: the famous basis for fluids simulations
StableFluids
StableFluids - part 2
Smoothed Particle Hydrodynamics
Position Based Dynamics
Challenge: Smoke using StableFluids
Conclusion
The polygon function
Credits
Bonus lecture

This link provides further information on the courses you can look at taking based on your interests and skill level.

Save this course

Save Learn to Write Unity Compute Shaders to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Learn to Write Unity Compute Shaders with these activities:
Review Linear Algebra Fundamentals
Solidify your understanding of linear algebra concepts, which are essential for understanding transformations and data manipulation within compute shaders.
Browse courses on Linear Algebra
Show steps
  • Review vector and matrix operations.
  • Practice solving linear systems of equations.
  • Understand vector spaces and linear transformations.
Brush up on C# Scripting in Unity
Practice your C# scripting skills within the Unity environment to prepare for writing and interacting with compute shaders.
Browse courses on C# Scripting
Show steps
  • Review basic C# syntax and concepts.
  • Practice creating and manipulating GameObjects.
  • Implement simple game mechanics using C# scripts.
Read 'Unity Shaders and Effects Cookbook'
Gain a broader understanding of shader concepts and techniques to complement your knowledge of compute shaders.
Show steps
  • Read through the chapters on image effects and post-processing.
  • Experiment with the provided code examples in Unity.
  • Try adapting some of the techniques to compute shaders.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement Basic Compute Shader Examples
Reinforce your understanding of compute shader syntax and data handling by implementing simple examples from scratch.
Show steps
  • Create a compute shader that adds two buffers together.
  • Implement a compute shader that performs a simple image filter.
  • Write a compute shader that calculates the average of an array.
Create a Simple Particle System with Compute Shaders
Apply your knowledge of compute shaders to create a visually interesting particle system, solidifying your understanding of data handling and parallel processing.
Show steps
  • Create a buffer to store particle data (position, velocity, etc.).
  • Write a compute shader to update particle positions based on velocity and forces.
  • Render the particles using a Mesh or Graphics.DrawProcedural.
  • Add user controls to adjust particle parameters.
Follow Advanced Compute Shader Tutorials
Expand your knowledge by following tutorials on advanced compute shader techniques, such as fluid simulation or global illumination.
Show steps
  • Find tutorials on topics like SPH or ray tracing with compute shaders.
  • Carefully follow the tutorial steps and understand the code.
  • Adapt the tutorial code to your own projects.
Contribute to a Compute Shader Project
Deepen your understanding and gain practical experience by contributing to an open-source project that utilizes compute shaders.
Show steps
  • Find an open-source project that uses compute shaders.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.

Career center

Learners who complete Learn to Write Unity Compute Shaders will develop knowledge and skills that may be useful to these careers:
Shader Developer
Shader developers specialize in writing the code that determines how objects appear visually in a 3D environment. As a shader developer, you will be immersed in the world of Unity Compute Shaders. A course on this subject is directly relevant to your work. The course covers the basics of compute shaders, including passing data from the CPU to the GPU using buffers. You'll learn how to create post-processing filters and handle particle effects. The course ensures that you understand how to use Compute Shaders to optimize game performance, a key skill for any shader developer. The shader developer will benefit from sections of the course like creating a flock of thousands of birds and creating a GPU Physics engine that can handle thousands of tumbling chess pieces.
Graphics Programmer
A graphics programmer focuses on the technical aspects of creating visuals in games or other applications. Learning to write Unity Compute Shaders puts you on the cutting edge of Unity development, making this an ideal course. As a graphics programmer, you might optimize rendering pipelines or implement advanced visual effects. This course helps you use the GPU to handle tasks that would otherwise bottleneck the CPU, leading to massive performance improvements. You'll learn how to create blisteringly fast post-processing filters and handle particle effects, skills directly applicable to optimizing graphics performance. The section on mesh deformation is also applicable.
Physics Programmer
Physics programmers specialize in implementing realistic physics simulations within games or other applications. The work of a physics programmer often involves optimizing performance and creating believable interactions. This course on Unity Compute Shaders is directly applicable to optimizing physics simulations. You'll learn how to use the GPU to handle complex physics calculations, such as fluid dynamics and collision detection. The course covers topics like GPU physics, smoothed particle hydrodynamics, and position-based dynamics. As a physics programmer, you will use Compute Shaders to create GPU Physics engines.
Game Developer
Game developers create video games for computers, consoles, and mobile devices. Working as a game developer requires optimizing game performance and creating visually appealing effects. Knowledge of Compute Shaders is advantageous. This Unity Compute Shaders course helps in learning how to use the GPU efficiently for tasks like particle effects, flocking calculations, GPU physics, and fluid simulations. As a game developer, you'll benefit from the course's coverage of handling thousands of objects simultaneously and optimizing CPU-intensive calculations. The course is ideal for ensuring a game has the best performance by offloading tasks to the GPU, with specific examples such as flocking calculations and physics simulations.
Rendering Engineer
Rendering engineers focus on optimizing and improving the rendering pipeline in games or other graphical applications. Rendering engineers require a firm understanding of Compute Shaders. This course provides a foundation in using the GPU for tasks such as post-processing effects, particle rendering, and fluid simulations. As a rendering engineer, you will have to use these skills every day. The sections on image filters and mesh deformation are particularly important for optimizing rendering performance. As a rendering engineer, you may find that GPU Physics Compute Shader skills are in high demand.
Technical Artist
Technical artists bridge the gap between artists and programmers, optimizing art assets for use in games and interactive media. The technical artist benefits greatly from a course on Unity Compute Shaders. This course introduces the use of the GPU for tasks such as particle effects, flocking calculations, and fluid simulations. The course is particularly helpful for optimizing performance and creating visual effects. This course provides a strong foundation for any technical artist looking to improve their skills in Unity development. You can use Compute Shaders to handle the orientation of grass blades as an avatar moves through grass. The section on using Blender to create a single grass clump is also applicable.
Simulation Engineer
Simulation engineers design and develop simulations for various purposes, such as training, research, or entertainment. This role often requires advanced degrees. The course on Unity Compute Shaders may be applicable. The course touches on topics like fluid simulations and GPU physics. Fluid simulation is a computationally intensive field. This course teaches how to simulate complex physical systems efficiently using the GPU. The section on Smoothed Particle Hydrodynamics is particularly valuable. Learning to use Compute Shaders provides simulation engineers with powerful tools for optimizing simulation performance. As a simulation engineer, you may find that GPU Physics Compute Shader skills are in high demand.
Virtual Reality Developer
Virtual reality developers create immersive experiences for VR platforms. The work of a virtual reality developer often involves optimizing performance and creating realistic visuals. Taking a course on Unity Compute Shaders may be a benefit. This course can help learn to harness the power of the GPU for tasks like rendering complex scenes and simulating physics. The course's coverage of fluid simulations and particle effects is also valuable for creating realistic VR environments. The sections on creating a flock of thousands of birds or covering a surface with grass using Blender are very useful.
Augmented Reality Developer
Augmented reality developers create applications that overlay digital content onto the real world. These applications often require efficient rendering and real-time processing. An AR developer may find a course on Unity Compute Shaders helpful. This course teaches how to leverage the GPU. Compute Shaders are useful for handling complex calculations. You'll learn techniques for optimizing performance and creating visual effects. The sections on image filters and mesh deformation are particularly relevant for AR applications. The AR developer uses these skills to enhance visual fidelity in their applications.
AI Programmer
AI programmers design and implement artificial intelligence systems for games or other applications. The work of this kind of programmer often involves optimizing performance and handling large amounts of data. This course on Unity Compute Shaders may be helpful. This course can help AI Programmers learn to use the GPU for tasks such as pathfinding and decision-making. Topics like flocking calculations are also relevant for simulating group behavior. The skills learned in this course can help AI programmers create more efficient and realistic AI systems. The AI programmer may use this information to create the swish of the tail.
Software Engineer
Software engineers design, develop, and test software systems. This role can encompass various specializations, including graphics and game development. A course on Unity Compute Shaders may be helpful. As a software engineer, you can broaden your skill set and explore new areas of development. This course provides a practical introduction to GPU programming and parallel computing. You'll learn how to use Compute Shaders. Handling complex calculations is a great skill to have. The knowledge gained can translate to other areas of software development. As a software engineer, you can bring a unique perspective to the team by having an understanding of graphics.
Research Scientist
Research scientists conduct research to advance knowledge in a particular field. They often require advanced degrees. In fields like computer graphics or physics, knowledge of GPU programming is valuable. This course on Unity Compute Shaders may be helpful. The research scientist learns about topics such as fluid simulations, GPU physics, and parallel computing. These skills can be applied to various research projects, such as simulating physical phenomena or developing new rendering techniques. The research scientist may use this knowledge to investigate StableFluids.
Machine Learning Engineer
Machine learning engineers develop and deploy machine learning models. This role often requires advanced degrees. Many machine learning tasks benefit from GPU acceleration. A course on Unity Compute Shaders may be useful. You'll learn the fundamentals of GPU programming and parallel computing. You'll discover how to leverage the GPU for training and inference. The skills learned in this course can help machine learning engineers optimize the performance of machine learning models. The knowledge gained in this course may be applicable to other areas of research, such as fluid simulation.
Data Scientist
Data scientists analyze large datasets to extract insights and inform decision-making. While not directly related to graphics, a course on Unity Compute Shaders may still be helpful. This course teaches parallel computing concepts. You'll learn how to use the GPU for data processing tasks. This skill can be valuable for accelerating certain data analysis workflows. The knowledge gained in this course may be applicable to other areas of research, such as physics or AI. Data scientists often require advanced degrees.
Web Developer
Web developers create and maintain websites and web applications. If the focus is on creating interactive or visually rich web experiences, a course on Unity Compute Shaders may be relevant. This course could help web developers learn how to use the GPU for tasks such as creating animated effects or interactive visualizations. This course teaches you about passing data from the CPU to the GPU using buffers. This may be useful in creating visually impressive websites or web apps. The web developer may use the knowledge of noise in the shader to add effects to a site.

Featured in The Course Notes

This course is mentioned in our blog, The Course Notes. Read one article that features Learn to Write Unity Compute Shaders:

Reading list

We've selected one books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Learn to Write Unity Compute Shaders.
Provides practical recipes for creating various shader effects in Unity. It covers a wide range of techniques, including image effects, lighting, and surface shaders. While this course focuses on compute shaders, this book can provide a broader understanding of shader concepts and how they fit into the Unity rendering pipeline. It useful reference for understanding the context in which compute shaders operate.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser