URP ShaderGraph versus writing URP Shaders (with lighting) by hand

Our suggestion is that avoid writing handwritten HLSL shaders if Shader Graph can do the job for you. There are many benefits, including having friendly workflow for your artists in the team so they can also make adjustments when they need.

Having said that, Shader Graph has its limitation and also many developers prefer handwritten shaders over graph based tools due to ease of development, maintenance etc. We are not discouraging users from writing HLSL shaders or using URP standard ones as a base to start and modify. But like you mention, it requires a bit more expertise and also comes with a cost of maintenance for your project when upgrading. HLSL shaders are not really designed to define a public/private API contract. So as we make improvements, we might break your modifications. Another factor here is that HLSL shaders are not documented yet so it requires understanding the shaders and were to modify. However, there are a lot of projects we have seen that have successfully managed this and can absorb the cost of maintenance in favour of customisability. And FYI, Block Shaders is meant to address implications with HLSL shaders and the work is in progress.

On the topic of Custom SRP (as completely building one from scratch), there are very very few customers who do this and they have graphics engineers onboard. It’s a flexibility that is available for users and is one of the big advantages of SRPs. But it’s complex, requires expertise and dedication to maintenance. If you do really need to customise your pipeline, our recommendation is to start with URP/HDRP base and not from scratch. And URP definitely is a much easier pipeline to start with and a better fit for VR as well. It does come with the cost of merging changes when upgrading and we do have a lot of games made and shipped with URP/HDRP that have some level of customisability in the source. It’s a question of whether it’s worth the effort for the result you are after and whether you can absorb the cost of maintaining a custom URP/HDRP. Also depends on the type and amount of changes you make to the pipeline. Simple changes can be very easy to maintain and merge. So your mileage may vary.

1 Like