Reader small image

You're reading from  Become a Unity Shaders Guru

Product typeBook
Published inJul 2023
Reading LevelN/a
PublisherPackt
ISBN-139781837636747
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Mina Pêcheux
Mina Pêcheux
author image
Mina Pêcheux

Mina Pêcheux is a freelance content creator who has been passionate about game development since an early age. She is a graduate of the French Polytech School of Engineering in applied mathematics and computer science. After a couple of years of working as a data scientist and web developer in startups, she turned to freelancing and online instructional content creation to reconnect with what brightens her days: learning new things everyday, sharing with others and creating multi-field projects mixing science, technology, and art.
Read more about Mina Pêcheux

Right arrow

Applying a compute shader-based screen effect in URP

So far, we have seen how to use compute shaders to optimize calculations on pure data. We eventually used the information to modify cube visual properties, but it was a sort of “side-effect” to make it easier to see the results: in theory, we could have simply stuck to the compute part and measured the execution time to compare our CPU and GPU process performances.

Still, screen effects and postprocessing are big applications of compute shaders, so we definitely need to have a look at how we can use these shaders to directly render something on our screen.

To test things out, we are going to create a very simple compute shader that fills the screen with red pixels. The goal is thus to effectively end up with a fully red screen. I know, it is not a very exciting idea, but it will be a good way to understand the basics of using compute shaders in a URP project without too much distraction!

In the following sections...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Become a Unity Shaders Guru
Published in: Jul 2023Publisher: PacktISBN-13: 9781837636747

Author (1)

author image
Mina Pêcheux

Mina Pêcheux is a freelance content creator who has been passionate about game development since an early age. She is a graduate of the French Polytech School of Engineering in applied mathematics and computer science. After a couple of years of working as a data scientist and web developer in startups, she turned to freelancing and online instructional content creation to reconnect with what brightens her days: learning new things everyday, sharing with others and creating multi-field projects mixing science, technology, and art.
Read more about Mina Pêcheux