material-maker icon indicating copy to clipboard operation
material-maker copied to clipboard

Uniform parameter node

Open novalis opened this issue 3 years ago • 3 comments

Feature/enhancement description:

I want to have a shader with parameters that I can control from code. In Godot, I can do this by calling set_shader_param to set the value of any uniforms. But I can't easily create such a uniform from Material Maker. When I tried adding uniform float foo = 1.0; in the Instance Functions section of a greyscale node, it somehow got translated to const float foo = 1.0; in the shader output. And, while maybe I could add uniform float foo = 1.0; to my Material's preview and export tabs, that wouldn't help me when previewing only this node (and its dependents).

Of course, I could manually hack the shader after exporting it, but for obvious reasons, I would prefer to avoid that.

novalis avatar Jun 24 '22 19:06 novalis

I already have a prototype for that, but didn't include it yet. It basically turns named parameters (in top level Remote node) into uniforms. This needs a bit more work but if you need it now, please don't hesitate to contact me on discord. But yeah, it's planned. ;)

RodZill4 avatar Jun 24 '22 20:06 RodZill4

That would be great! Are we still planing to do that?

poiati avatar May 09 '23 18:05 poiati