I’ve been trying to learn how to manually write shader code using HLSL, but I can’t seem to get it to work with Visual Studio. In my case, I’m using URP and have a .hlsl file with a function that I use in a ‘custom function’ node in shader graph. The code works just fine in the unity editor without errors, but in Visual Studio, any of the built-in functions and parameters cause errors in the visual studio console. I have the HLSL extension in Visual studio, but it doesn’t cover the Unity functions. What could be causing the errors? How do you manually write shader code? Should I use another IDE like rider for this? Thanks for your time.
i’m assuming the hlsl extension is what’s causing the errors, because i just write them raw no intellisense no error checking and i only get told when something’s wrong when unity loads it. there’s not really a convenient way to write shaders.
1 Like