4
Transforming Your Shader into a Lit PBS Shader
In Chapter 3, we discovered the basics of programming a shader for the new Universal Render Pipeline (URP) using HLSL code. We saw how it differs from legacy shader scripting, focused on a few commonly used built-in variables and functions that must be changed when switching over to this new ecosystem, and eventually applied all of this theory to a hands-on example. As a result, by the end of that chapter, we had a simple unlit URP shader with a base color and a main texture property.
This was a nice introduction to the topic, but of course, modern video games only rarely ship with this rough a shading level – while having all of your objects unlit could be a conscious artistic choice, it would ...
Get Become a Unity Shaders Guru now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.