0 votes

Since i have different masks that I can use for the transition, I want to be able to choose the mask I want to use. However I don't know how to load it in code.

I want to change the mask via code as seen above

Godot version 3.2
in Engine by (15 points)

1 Answer

+1 vote
Best answer
material.set_shader_param("mask", preload("pathtoyourtexturehere"))

It is in built-in documentation ;). The only problem is referencing the material. Take a note what material path You are using - it can be mesh.material or surfacegetmaterial(surface) or materialoverride or even drawpass.material

by (7,742 points)
selected by

thank u so much

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.