Node editor comment node

I had a chat with one of my team members on a shader I made for us but he wanted a md file to explain the core parts of the shader.

Thought it would be great to have a comment node where I can add comments for parts of code in the shader but it does not have to be part of the build shader when you generate the code.

cc @PatrickRyan and @Deltakosh for this one :slight_smile:

You can add comment per node:

So the overall idea would be to maybe add a node to hold your comment maybe? Or simply use comments on the nodes where you need to explain things

@Johan_Rabie, you can also add comments to frames, which would allow you to be a bit more verbose about a section of the shader. The comments will respect the frame and not flow outside. One challenge we have with comments on nodes is that once the comment is longer than the width of the node, they will commonly run into other nodes unless you position them precisely, but then a reflow of the graph may end up changing that position. Placing them in frames does allow you to mitigate that somewhat, so long as there is space at the top of the frame clear of nodes:

3 Likes

That is perfect thanks PatrickRyan

1 Like