It's kinda annoying that you have to change a material's shader by using .getShader(). their should be a way to change the material's shader by using the Material panel or the Material Nodes panel or the Outliner.
how is it annoying exactly? my guess is you have a project where you need multiple custom materials on multiple objects, and nodes is not enough so you need to execute scripts on all the objects?
their should be a way to change the material's shader by using the Material panel or the Material Nodes panel or the Outliner.
you mean like, a visual way of setting a custom shader? a box where you select a text file to use for the material? maybe a new "custom shader" node if that's even posible?
edit: or you mean chaging the object's material for a different one?
@Anarchokawaii : Are you meaning a way to define the vertex shader and fragment shader in UI and to give some values to uniforms ?
Oh yes, that'd bring more people to shader creation!
you mean like, a visual way of setting a custom shader? a box where you select a text file to use for the material? maybe a new "custom shader" node if that's even posible?
yeah pretty much. the last sentence sounds like the best possible option
not bad idea at all !
The drawback of custom shader nodes is that blender doesn't support settings for vertex shader from node side.
Also i don't think the user will use the fragment shader in only one node but more try to have a library GLSL and create a node per function.
Custom GLSL function nodes is perfect idea. I am 100% about it!
Most helpful comment
@Anarchokawaii : Are you meaning a way to define the vertex shader and fragment shader in UI and to give some values to uniforms ?