Is there anyway to convert the .shadergraph file in HDRP to code file like .hlsl?

I just begin to learn HDRP.When looking over the shader in HDRP package,I don’t get used to the nodes in shadergraph,and I prefer to writing code like hlsl in URP.

If you’d rather write code instead of using the SG node, you can attach a hlsl file with function in the custom node in the shader graph.
If you meant writing your own shader from scracth in HDRP without using shader graph, it’s not impossible, but it’s clearly not recommanded as it requires an extensive knowledge of HDRP pipeline and shaders.

I know this isn’t answering your question… but you are far better off learning the nodes and becoming efficient with shader graph, than to embark on a path of hand-written shaders… this will be infinitely more complex to write and maintain over time.

1 Like

Here’s a thread about writing custom shaders.

As for the question of taking a shadergraph “shader” and converting that to hlsl, it’s not impossible but impractical.
But what you can do is get something like Amplify Shader Editor as it compiles to regular shader files.