Trying to mimic a mix shader just like in blender

Godot Version

Godot 4.6.1 stable

Question

Hi, I do not know if this were a very simple question or not and if this question has been asked before or not, but I would like to ask if it were possible to create a function something similar to this node in blender?

For context, I am trying to create something like a shader than can mix between the albedo texture and the vertex single colour. I know there is a mix() function but, i was thinking like could I change the opacity of the albedo texture but still having the whole mesh being opaque. ( and of course, having a slider to change the “factor” like in this blender node)

This is because i have painted some texture before hand that is reusable but i think some of them are a bit too dark on some case.

Is it possible to not use alpha?

Thank you for helping.

Mesh instance nodes have two properties: material_override and material_overlay. Assign one material to override and the other to overlay. Adjust overlay’s alpha (and/or blending mode) as needed.

sorry wait, i have been using surface material override all the time, but i want to ask, is it possible to done it via the shader itself?

Can you show a mockup of the effect?

i was trying to create something like this

It is like in terms of painting a digital art, i can change the opacity of the albedo texture..

when it has a little factor of the colour, it shows most of the texture

is it possible to mimic this in godot shader?

thanks for helping

mix() should be able to do it.

Could you explain more? like how to create the slider and stuff?

Add a float uniform to the shader and use it as mixing weight. You’ll be able to set its value from the inspector.

1 Like

thank you so much, after looking through the documents, i finally did it.

thank you very much.

1 Like