Shader picks up existing texture on object

Godot Version

4.6.1

Question

I’ve been trying to put shaders on all objects in the game I’m working on. The artist sent me a shader file but is telling me i have to re-apply every texture to every object in the game, which is less than ideal, of course.

So my question is, from the visual shader window, is there a way to get the shader to use a texture from a material already on an object?

In 3D no, a shader would be a new material so there shouldn’t be an existing texture when the material is overwritten by your new shader. If your shader is built to be used as a next_pass then maybe you could use the existing material, but that’s only if it’s intentionally designed for a next_pass

1 Like

You can write an editor script that automates the swap.

1 Like

Got it. Thanks.

How would one go about doing this? I’ve never written a script for the editor.

This page on tool scripts should help, I think specifically an EditorScript may be the quickest way for you to do this

2 Likes

thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.