I’m trying to create a simple graph that just samples a cubemap with the object’s normals and displays the value. After realizing that the built-in “Sample Cubemap” node automatically applies reflection that I can’t seem to turn off (which seems like a really bizarre/bad decision to me??? but I digress), I thought to myself “fine, I’ll just write a custom function to do this instead”.
But, well… :\
I get this. I have no idea how I’m supposed to fix this, this is a pretty unhelpful error message. Any clue what’s going on here?
OK so I figured out that this is related to having a space in the “Name” field. I’m guessing it just naively tries to construct a function name from that field without trying to do any error checking or sanitizing at all.
My code was also wrong, naturally, but the error was completely unrelated to that. Actually, now that I’m digging in, the custom node’s UX in general is… pretty severely lacking, tbh.
-
Supplying a malformed name field results in unhelpful error messages. The name field should be sanity checked before it tries to just dump it into a shader file as-is.
-
Not supplying a name results in an auto-generated function name (good), but also prepends all inputs and outputs with that function name without telling you and will as a result throw errors on trying to reference them by the names you defined (bad). Honestly, this should either give me an error if I supply no name, or it shouldn’t auto-rename the variables and prevent me from referencing them.