This project was part of my studies at the Saxion University of Applied Sciences, where I was challenged to convert a built-in render pipeline project over to the universal render pipeline.
The Built-In Render Pipeline is Unity's original rendering system. It utilizes mostly HLSL shaders to render its projects. The Universal Render Pipeline is Unity's new render pipeline, which focuses on using Shader Graph to render its projects.
Shader Graph is the new advancement that came with URP. Shader graph allows you to use a node based approach, where each node is a function or variable in the shader code. It then generates a HLSL shader with that code, allowing you to bypass the manual shader writing process. However, shader graph can be limiting due to it not supporting all functions, so knowledge of HLSL will be required to write your own custom functions anyways, and some programmers prefer to program shaders in HLSL. Because of this, I challenged myself to port over this old planet generation project I had over to URP in HLSL.
A big advantage of the BRP is the existence of surface shaders. These shaders come with receiving and casting shadows, as well as smoothness (which is inverse roughness) and metallic support. URP does not have surface shaders, and instead relies on BlinnPhong rendering functions to manually calculate receive lighting, metallic and smoothness. It requires the programming of a shadow render pass to cast shadows. This leads to a much higher complexity on URP surface shaders.
Post Processing shaders are another challenge in URP. This is because there is no option to create a standard HLSL post processing shader. You can only create one in Shader Graph. So if you want to write one in HLSL, you need to export the generated code from a Shader Graph shader and edit that. This however generates a shader with ~50% redundant code, which needs to be filtered through for optimization, as it creates a whole second render pass that does not need to exist, as well as having uneccessary includes and variable declarations.
This project is based on the work of Sebastian Lague.