Local variables in the "material graph" shader editor

J.R. Miller
Wed, 23 Jul 2025 03:18:40 +0000
Programming & Scripting

In the material graph, how do you do create and assign values to local variables?

pseudo code:

var a = some_texture;
a = some_different_texture;

It seems absurd that there would be a scripting language, visual or not, that forbid the creation of local variables. It just seems terrible. This super fundamental feature has existed since the beginning of programming. But after spending a while searching, I could not find out how to do this in the material editor.

I think I am going insane. How do you do this?

2 posts - 2 participants