Summary
In this chapter, we worked on the fundamentals of writing HLSL shaders for the new URP pipeline by studying a very common shader for modern video games – a PBS lit shader.
We talked about all the built-in helpers and functions the URP offers to help us design lighting, especially for such a common type of shading. We also focused on shader keywords and the additional data structures that physically based shading requires, compared to our previous unlit shader.
We then coded the logic of our shaders to display various properties and properly initialize the data structures. Finally, we saw how to pass all the required data in our vertex and fragment shader functions.
Now, we are fairly familiar with the basics of HLSL-based shaders for the Unity URP pipeline, and we even know where to look for built-in macros and handy ready-made functions. This is important for an advanced Unity technical artist because it means that you will be able to explore the ecosystem...